Instructions to use Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15") model = AutoModelForCausalLM.from_pretrained("Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15
- SGLang
How to use Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15 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 "Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15" \ --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": "Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15", "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 "Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15" \ --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": "Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15 with Docker Model Runner:
docker model run hf.co/Devy1/CodeLlama-7b-hf-AQLM-8bit-code-4x15
Upload tokenizer
Browse files- special_tokens_map.json +4 -0
- tokenizer.json +1 -0
- tokenizer.model +3 -0
- tokenizer_config.json +5 -0
special_tokens_map.json
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"additional_special_tokens": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"β<PRE>",
|
| 4 |
"β<MID>",
|
| 5 |
"β<SUF>",
|
|
|
|
| 1 |
{
|
| 2 |
"additional_special_tokens": [
|
| 3 |
+
"β<PRE>",
|
| 4 |
+
"β<MID>",
|
| 5 |
+
"β<SUF>",
|
| 6 |
+
"β<EOT>",
|
| 7 |
"β<PRE>",
|
| 8 |
"β<MID>",
|
| 9 |
"β<SUF>",
|
tokenizer.json
CHANGED
|
@@ -170,6 +170,7 @@
|
|
| 170 |
"end_of_word_suffix": null,
|
| 171 |
"fuse_unk": true,
|
| 172 |
"byte_fallback": true,
|
|
|
|
| 173 |
"vocab": {
|
| 174 |
"<unk>": 0,
|
| 175 |
"<s>": 1,
|
|
|
|
| 170 |
"end_of_word_suffix": null,
|
| 171 |
"fuse_unk": true,
|
| 172 |
"byte_fallback": true,
|
| 173 |
+
"ignore_merges": false,
|
| 174 |
"vocab": {
|
| 175 |
"<unk>": 0,
|
| 176 |
"<s>": 1,
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45ccb9c8b6b561889acea59191d66986d314e7cbd6a78abc6e49b139ca91c1e6
|
| 3 |
+
size 500058
|
tokenizer_config.json
CHANGED
|
@@ -60,6 +60,10 @@
|
|
| 60 |
}
|
| 61 |
},
|
| 62 |
"additional_special_tokens": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
"β<PRE>",
|
| 64 |
"β<MID>",
|
| 65 |
"β<SUF>",
|
|
@@ -67,6 +71,7 @@
|
|
| 67 |
],
|
| 68 |
"bos_token": "<s>",
|
| 69 |
"clean_up_tokenization_spaces": false,
|
|
|
|
| 70 |
"eos_token": "</s>",
|
| 71 |
"eot_token": "β<EOT>",
|
| 72 |
"fill_token": "<FILL_ME>",
|
|
|
|
| 60 |
}
|
| 61 |
},
|
| 62 |
"additional_special_tokens": [
|
| 63 |
+
"β<PRE>",
|
| 64 |
+
"β<MID>",
|
| 65 |
+
"β<SUF>",
|
| 66 |
+
"β<EOT>",
|
| 67 |
"β<PRE>",
|
| 68 |
"β<MID>",
|
| 69 |
"β<SUF>",
|
|
|
|
| 71 |
],
|
| 72 |
"bos_token": "<s>",
|
| 73 |
"clean_up_tokenization_spaces": false,
|
| 74 |
+
"device_map": "auto",
|
| 75 |
"eos_token": "</s>",
|
| 76 |
"eot_token": "β<EOT>",
|
| 77 |
"fill_token": "<FILL_ME>",
|