Instructions to use GaussianMixture/CodeLlama-34b-Instruct-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GaussianMixture/CodeLlama-34b-Instruct-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GaussianMixture/CodeLlama-34b-Instruct-hf")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GaussianMixture/CodeLlama-34b-Instruct-hf") model = AutoModelForCausalLM.from_pretrained("GaussianMixture/CodeLlama-34b-Instruct-hf") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use GaussianMixture/CodeLlama-34b-Instruct-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GaussianMixture/CodeLlama-34b-Instruct-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GaussianMixture/CodeLlama-34b-Instruct-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GaussianMixture/CodeLlama-34b-Instruct-hf
- SGLang
How to use GaussianMixture/CodeLlama-34b-Instruct-hf 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 "GaussianMixture/CodeLlama-34b-Instruct-hf" \ --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": "GaussianMixture/CodeLlama-34b-Instruct-hf", "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 "GaussianMixture/CodeLlama-34b-Instruct-hf" \ --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": "GaussianMixture/CodeLlama-34b-Instruct-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GaussianMixture/CodeLlama-34b-Instruct-hf with Docker Model Runner:
docker model run hf.co/GaussianMixture/CodeLlama-34b-Instruct-hf
Commit ·
f3eedfc
1
Parent(s): 79c1d04
Update config.json
Browse files- config.json +4 -1
config.json
CHANGED
|
@@ -17,7 +17,10 @@
|
|
| 17 |
"pad_token_id": 0,
|
| 18 |
"pretraining_tp": 1,
|
| 19 |
"rms_norm_eps": 1e-05,
|
| 20 |
-
"rope_scaling":
|
|
|
|
|
|
|
|
|
|
| 21 |
"rope_theta": 1000000,
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "float16",
|
|
|
|
| 17 |
"pad_token_id": 0,
|
| 18 |
"pretraining_tp": 1,
|
| 19 |
"rms_norm_eps": 1e-05,
|
| 20 |
+
"rope_scaling": {
|
| 21 |
+
"type": "linear",
|
| 22 |
+
"factor": 4.0
|
| 23 |
+
},
|
| 24 |
"rope_theta": 1000000,
|
| 25 |
"tie_word_embeddings": false,
|
| 26 |
"torch_dtype": "float16",
|