Instructions to use Brandoko/CodeLlama-13b-Recharts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Brandoko/CodeLlama-13b-Recharts with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Brandoko/CodeLlama-13b-Recharts")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Brandoko/CodeLlama-13b-Recharts") model = AutoModelForCausalLM.from_pretrained("Brandoko/CodeLlama-13b-Recharts") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Brandoko/CodeLlama-13b-Recharts with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Brandoko/CodeLlama-13b-Recharts" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Brandoko/CodeLlama-13b-Recharts", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Brandoko/CodeLlama-13b-Recharts
- SGLang
How to use Brandoko/CodeLlama-13b-Recharts 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 "Brandoko/CodeLlama-13b-Recharts" \ --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": "Brandoko/CodeLlama-13b-Recharts", "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 "Brandoko/CodeLlama-13b-Recharts" \ --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": "Brandoko/CodeLlama-13b-Recharts", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Brandoko/CodeLlama-13b-Recharts with Docker Model Runner:
docker model run hf.co/Brandoko/CodeLlama-13b-Recharts
Upload tokenizer
Browse files- special_tokens_map.json +0 -1
- tokenizer.json +0 -0
- tokenizer_config.json +10 -16
special_tokens_map.json
CHANGED
|
@@ -7,6 +7,5 @@
|
|
| 7 |
],
|
| 8 |
"bos_token": "<s>",
|
| 9 |
"eos_token": "</s>",
|
| 10 |
-
"pad_token": "</s>",
|
| 11 |
"unk_token": "<unk>"
|
| 12 |
}
|
|
|
|
| 7 |
],
|
| 8 |
"bos_token": "<s>",
|
| 9 |
"eos_token": "</s>",
|
|
|
|
| 10 |
"unk_token": "<unk>"
|
| 11 |
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -1,28 +1,26 @@
|
|
| 1 |
{
|
| 2 |
-
"add_bos_token": true,
|
| 3 |
-
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
| 7 |
-
"lstrip":
|
| 8 |
-
"normalized":
|
| 9 |
-
"rstrip":
|
| 10 |
"single_word": false,
|
| 11 |
"special": true
|
| 12 |
},
|
| 13 |
"1": {
|
| 14 |
"content": "<s>",
|
| 15 |
-
"lstrip":
|
| 16 |
-
"normalized":
|
| 17 |
-
"rstrip":
|
| 18 |
"single_word": false,
|
| 19 |
"special": true
|
| 20 |
},
|
| 21 |
"2": {
|
| 22 |
"content": "</s>",
|
| 23 |
-
"lstrip":
|
| 24 |
-
"normalized":
|
| 25 |
-
"rstrip":
|
| 26 |
"single_word": false,
|
| 27 |
"special": true
|
| 28 |
},
|
|
@@ -76,12 +74,8 @@
|
|
| 76 |
"pad_token": null,
|
| 77 |
"prefix_token": "▁<PRE>",
|
| 78 |
"sp_model_kwargs": {},
|
| 79 |
-
"suffix_first": false,
|
| 80 |
"suffix_token": "▁<SUF>",
|
| 81 |
"tokenizer_class": "CodeLlamaTokenizer",
|
| 82 |
-
"tokenizer_file": "/root/.cache/huggingface/hub/models--codellama--CodeLlama-13b-Instruct-hf/snapshots/ff0983bc4267bb98ead4fb5168fe2f049b442787/tokenizer.json",
|
| 83 |
-
"trust_remote_code": false,
|
| 84 |
"unk_token": "<unk>",
|
| 85 |
-
"use_default_system_prompt": false
|
| 86 |
-
"use_fast": true
|
| 87 |
}
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
| 2 |
"added_tokens_decoder": {
|
| 3 |
"0": {
|
| 4 |
"content": "<unk>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": true,
|
| 7 |
+
"rstrip": false,
|
| 8 |
"single_word": false,
|
| 9 |
"special": true
|
| 10 |
},
|
| 11 |
"1": {
|
| 12 |
"content": "<s>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": true,
|
| 15 |
+
"rstrip": false,
|
| 16 |
"single_word": false,
|
| 17 |
"special": true
|
| 18 |
},
|
| 19 |
"2": {
|
| 20 |
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": true,
|
| 23 |
+
"rstrip": false,
|
| 24 |
"single_word": false,
|
| 25 |
"special": true
|
| 26 |
},
|
|
|
|
| 74 |
"pad_token": null,
|
| 75 |
"prefix_token": "▁<PRE>",
|
| 76 |
"sp_model_kwargs": {},
|
|
|
|
| 77 |
"suffix_token": "▁<SUF>",
|
| 78 |
"tokenizer_class": "CodeLlamaTokenizer",
|
|
|
|
|
|
|
| 79 |
"unk_token": "<unk>",
|
| 80 |
+
"use_default_system_prompt": false
|
|
|
|
| 81 |
}
|