Text Generation
Transformers
Safetensors
llama
mergekit
Merge
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc") model = AutoModelForCausalLM.from_pretrained("djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc
- SGLang
How to use djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc 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 "djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc with Docker Model Runner:
docker model run hf.co/djuna/L3.1-Promissum_Mane-8B-Della-1.5-calc
Chat Template and EOS
Browse files- config.json +5 -1
- special_tokens_map.json +1 -1
- tokenizer_config.json +4 -2
config.json
CHANGED
|
@@ -6,7 +6,11 @@
|
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"head_dim": 128,
|
| 11 |
"hidden_act": "silu",
|
| 12 |
"hidden_size": 4096,
|
|
|
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
128001,
|
| 11 |
+
128008,
|
| 12 |
+
128009
|
| 13 |
+
],
|
| 14 |
"head_dim": 128,
|
| 15 |
"hidden_act": "silu",
|
| 16 |
"hidden_size": 4096,
|
special_tokens_map.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
"single_word": false
|
| 8 |
},
|
| 9 |
"eos_token": {
|
| 10 |
-
"content": "<|
|
| 11 |
"lstrip": false,
|
| 12 |
"normalized": false,
|
| 13 |
"rstrip": false,
|
|
|
|
| 7 |
"single_word": false
|
| 8 |
},
|
| 9 |
"eos_token": {
|
| 10 |
+
"content": "<|eot_id|>",
|
| 11 |
"lstrip": false,
|
| 12 |
"normalized": false,
|
| 13 |
"rstrip": false,
|
tokenizer_config.json
CHANGED
|
@@ -2050,14 +2050,16 @@
|
|
| 2050 |
}
|
| 2051 |
},
|
| 2052 |
"bos_token": "<|begin_of_text|>",
|
|
|
|
| 2053 |
"clean_up_tokenization_spaces": true,
|
| 2054 |
-
"eos_token": "<|
|
| 2055 |
"model_input_names": [
|
| 2056 |
"input_ids",
|
| 2057 |
"attention_mask"
|
| 2058 |
],
|
| 2059 |
"model_max_length": 131072,
|
| 2060 |
-
"pad_token": "<|
|
| 2061 |
"padding_side": "left",
|
|
|
|
| 2062 |
"tokenizer_class": "PreTrainedTokenizerFast"
|
| 2063 |
}
|
|
|
|
| 2050 |
}
|
| 2051 |
},
|
| 2052 |
"bos_token": "<|begin_of_text|>",
|
| 2053 |
+
"chat_template": "{{ '<|begin_of_text|>' }}{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ '<|start_header_id|>system<|end_header_id|>\n\n' + system_message + '<|eot_id|>' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|start_header_id|>user<|end_header_id|>\n\n' + content + '<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n' }}{% elif message['role'] == 'assistant' %}{{ content + '<|eot_id|>' }}{% endif %}{% endfor %}",
|
| 2054 |
"clean_up_tokenization_spaces": true,
|
| 2055 |
+
"eos_token": "<|eot_id|>",
|
| 2056 |
"model_input_names": [
|
| 2057 |
"input_ids",
|
| 2058 |
"attention_mask"
|
| 2059 |
],
|
| 2060 |
"model_max_length": 131072,
|
| 2061 |
+
"pad_token": "<|eot_id|>",
|
| 2062 |
"padding_side": "left",
|
| 2063 |
+
"split_special_tokens": false,
|
| 2064 |
"tokenizer_class": "PreTrainedTokenizerFast"
|
| 2065 |
}
|