Instructions to use adept/persimmon-8b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adept/persimmon-8b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adept/persimmon-8b-chat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adept/persimmon-8b-chat") model = AutoModelForCausalLM.from_pretrained("adept/persimmon-8b-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adept/persimmon-8b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adept/persimmon-8b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adept/persimmon-8b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/adept/persimmon-8b-chat
- SGLang
How to use adept/persimmon-8b-chat with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "adept/persimmon-8b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adept/persimmon-8b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "adept/persimmon-8b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adept/persimmon-8b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use adept/persimmon-8b-chat with Docker Model Runner:
docker model run hf.co/adept/persimmon-8b-chat
Update config.json
Browse files- config.json +0 -2
config.json
CHANGED
|
@@ -12,11 +12,9 @@
|
|
| 12 |
"layer_norm_eps": 1e-05,
|
| 13 |
"max_position_embeddings": 16384,
|
| 14 |
"model_type": "persimmon",
|
| 15 |
-
"norm_eps": 1e-05,
|
| 16 |
"num_attention_heads": 64,
|
| 17 |
"num_hidden_layers": 36,
|
| 18 |
"num_key_value_heads": 64,
|
| 19 |
-
"pretraining_tp": 1,
|
| 20 |
"qk_layernorm": true,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 25000.0,
|
|
|
|
| 12 |
"layer_norm_eps": 1e-05,
|
| 13 |
"max_position_embeddings": 16384,
|
| 14 |
"model_type": "persimmon",
|
|
|
|
| 15 |
"num_attention_heads": 64,
|
| 16 |
"num_hidden_layers": 36,
|
| 17 |
"num_key_value_heads": 64,
|
|
|
|
| 18 |
"qk_layernorm": true,
|
| 19 |
"rope_scaling": null,
|
| 20 |
"rope_theta": 25000.0,
|