Instructions to use mixamrepijey/chonk-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mixamrepijey/chonk-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mixamrepijey/chonk-code")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mixamrepijey/chonk-code") model = AutoModelForCausalLM.from_pretrained("mixamrepijey/chonk-code") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mixamrepijey/chonk-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mixamrepijey/chonk-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mixamrepijey/chonk-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mixamrepijey/chonk-code
- SGLang
How to use mixamrepijey/chonk-code 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 "mixamrepijey/chonk-code" \ --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": "mixamrepijey/chonk-code", "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 "mixamrepijey/chonk-code" \ --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": "mixamrepijey/chonk-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mixamrepijey/chonk-code with Docker Model Runner:
docker model run hf.co/mixamrepijey/chonk-code
Upload tokenizer
Browse files- tokenizer_config.json +7 -9
tokenizer_config.json
CHANGED
|
@@ -60,6 +60,10 @@
|
|
| 60 |
}
|
| 61 |
},
|
| 62 |
"additional_special_tokens": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
"β<PRE>",
|
| 64 |
"β<MID>",
|
| 65 |
"β<SUF>",
|
|
@@ -87,18 +91,12 @@
|
|
| 87 |
"legacy": null,
|
| 88 |
"middle_token": "β<MID>",
|
| 89 |
"model_max_length": 4096,
|
| 90 |
-
"pad_token":
|
| 91 |
-
"__type": "AddedToken",
|
| 92 |
-
"content": "</s>",
|
| 93 |
-
"lstrip": false,
|
| 94 |
-
"normalized": true,
|
| 95 |
-
"rstrip": false,
|
| 96 |
-
"single_word": false
|
| 97 |
-
},
|
| 98 |
"prefix_token": "β<PRE>",
|
| 99 |
"sp_model_kwargs": {},
|
|
|
|
| 100 |
"suffix_token": "β<SUF>",
|
| 101 |
-
"tokenizer_class": "
|
| 102 |
"unk_token": {
|
| 103 |
"__type": "AddedToken",
|
| 104 |
"content": "<unk>",
|
|
|
|
| 60 |
}
|
| 61 |
},
|
| 62 |
"additional_special_tokens": [
|
| 63 |
+
"β<PRE>",
|
| 64 |
+
"β<MID>",
|
| 65 |
+
"β<SUF>",
|
| 66 |
+
"β<EOT>",
|
| 67 |
"β<PRE>",
|
| 68 |
"β<MID>",
|
| 69 |
"β<SUF>",
|
|
|
|
| 91 |
"legacy": null,
|
| 92 |
"middle_token": "β<MID>",
|
| 93 |
"model_max_length": 4096,
|
| 94 |
+
"pad_token": "</s>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
"prefix_token": "β<PRE>",
|
| 96 |
"sp_model_kwargs": {},
|
| 97 |
+
"suffix_first": false,
|
| 98 |
"suffix_token": "β<SUF>",
|
| 99 |
+
"tokenizer_class": "CodeLlamaTokenizer",
|
| 100 |
"unk_token": {
|
| 101 |
"__type": "AddedToken",
|
| 102 |
"content": "<unk>",
|