Text Generation
Transformers
Safetensors
Greek
English
mistral
finetuned
conversational
text-generation-inference
Instructions to use ilsp/Meltemi-7B-Instruct-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ilsp/Meltemi-7B-Instruct-v1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ilsp/Meltemi-7B-Instruct-v1.5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ilsp/Meltemi-7B-Instruct-v1.5") model = AutoModelForCausalLM.from_pretrained("ilsp/Meltemi-7B-Instruct-v1.5") 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 ilsp/Meltemi-7B-Instruct-v1.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ilsp/Meltemi-7B-Instruct-v1.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ilsp/Meltemi-7B-Instruct-v1.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ilsp/Meltemi-7B-Instruct-v1.5
- SGLang
How to use ilsp/Meltemi-7B-Instruct-v1.5 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 "ilsp/Meltemi-7B-Instruct-v1.5" \ --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": "ilsp/Meltemi-7B-Instruct-v1.5", "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 "ilsp/Meltemi-7B-Instruct-v1.5" \ --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": "ilsp/Meltemi-7B-Instruct-v1.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ilsp/Meltemi-7B-Instruct-v1.5 with Docker Model Runner:
docker model run hf.co/ilsp/Meltemi-7B-Instruct-v1.5
Upload tokenizer
Browse files- added_tokens.json +13 -0
- special_tokens_map.json +63 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +147 -0
added_tokens.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<pad>": 61366,
|
| 3 |
+
"<|/context|>": 61371,
|
| 4 |
+
"<|assistant|>": 61369,
|
| 5 |
+
"<|context|>": 61370,
|
| 6 |
+
"<|system|>": 61367,
|
| 7 |
+
"<|tldr|>": 61376,
|
| 8 |
+
"<|translate-el-en|>": 61375,
|
| 9 |
+
"<|translate-en-el|>": 61374,
|
| 10 |
+
"<|user|>": 61368,
|
| 11 |
+
"[/INST]": 61373,
|
| 12 |
+
"[INST]": 61372
|
| 13 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|system|>",
|
| 4 |
+
"<|user|>",
|
| 5 |
+
"<|assistant|>",
|
| 6 |
+
"<|context|>",
|
| 7 |
+
"<|/context|>",
|
| 8 |
+
"[INST]",
|
| 9 |
+
"[/INST]",
|
| 10 |
+
"<|translate-en-el|>",
|
| 11 |
+
"<|translate-el-en|>",
|
| 12 |
+
"<|tldr|>"
|
| 13 |
+
],
|
| 14 |
+
"bos_token": {
|
| 15 |
+
"content": "<s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"cls_token": {
|
| 22 |
+
"content": "<s>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false
|
| 27 |
+
},
|
| 28 |
+
"eos_token": {
|
| 29 |
+
"content": "</s>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
},
|
| 35 |
+
"mask_token": {
|
| 36 |
+
"content": "<unk>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false
|
| 41 |
+
},
|
| 42 |
+
"pad_token": {
|
| 43 |
+
"content": "<pad>",
|
| 44 |
+
"lstrip": false,
|
| 45 |
+
"normalized": false,
|
| 46 |
+
"rstrip": false,
|
| 47 |
+
"single_word": false
|
| 48 |
+
},
|
| 49 |
+
"sep_token": {
|
| 50 |
+
"content": "</s>",
|
| 51 |
+
"lstrip": false,
|
| 52 |
+
"normalized": false,
|
| 53 |
+
"rstrip": false,
|
| 54 |
+
"single_word": false
|
| 55 |
+
},
|
| 56 |
+
"unk_token": {
|
| 57 |
+
"content": "<unk>",
|
| 58 |
+
"lstrip": false,
|
| 59 |
+
"normalized": false,
|
| 60 |
+
"rstrip": false,
|
| 61 |
+
"single_word": false
|
| 62 |
+
}
|
| 63 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:531c02ac6d66e23eb0269bc8c396094abc612491af242b731cf0ffb42a769aa4
|
| 3 |
+
size 1180082
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": true,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"0": {
|
| 7 |
+
"content": "<unk>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"1": {
|
| 15 |
+
"content": "<s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"2": {
|
| 23 |
+
"content": "</s>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": true
|
| 29 |
+
},
|
| 30 |
+
"61366": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"61367": {
|
| 39 |
+
"content": "<|system|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": true,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": true,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"61368": {
|
| 47 |
+
"content": "<|user|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": true,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": true,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"61369": {
|
| 55 |
+
"content": "<|assistant|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": true,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": true,
|
| 60 |
+
"special": true
|
| 61 |
+
},
|
| 62 |
+
"61370": {
|
| 63 |
+
"content": "<|context|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": true,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": true,
|
| 68 |
+
"special": true
|
| 69 |
+
},
|
| 70 |
+
"61371": {
|
| 71 |
+
"content": "<|/context|>",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": true,
|
| 74 |
+
"rstrip": false,
|
| 75 |
+
"single_word": true,
|
| 76 |
+
"special": true
|
| 77 |
+
},
|
| 78 |
+
"61372": {
|
| 79 |
+
"content": "[INST]",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": true,
|
| 82 |
+
"rstrip": false,
|
| 83 |
+
"single_word": true,
|
| 84 |
+
"special": true
|
| 85 |
+
},
|
| 86 |
+
"61373": {
|
| 87 |
+
"content": "[/INST]",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": true,
|
| 90 |
+
"rstrip": false,
|
| 91 |
+
"single_word": true,
|
| 92 |
+
"special": true
|
| 93 |
+
},
|
| 94 |
+
"61374": {
|
| 95 |
+
"content": "<|translate-en-el|>",
|
| 96 |
+
"lstrip": false,
|
| 97 |
+
"normalized": true,
|
| 98 |
+
"rstrip": false,
|
| 99 |
+
"single_word": true,
|
| 100 |
+
"special": true
|
| 101 |
+
},
|
| 102 |
+
"61375": {
|
| 103 |
+
"content": "<|translate-el-en|>",
|
| 104 |
+
"lstrip": false,
|
| 105 |
+
"normalized": true,
|
| 106 |
+
"rstrip": false,
|
| 107 |
+
"single_word": true,
|
| 108 |
+
"special": true
|
| 109 |
+
},
|
| 110 |
+
"61376": {
|
| 111 |
+
"content": "<|tldr|>",
|
| 112 |
+
"lstrip": false,
|
| 113 |
+
"normalized": true,
|
| 114 |
+
"rstrip": false,
|
| 115 |
+
"single_word": true,
|
| 116 |
+
"special": true
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"additional_special_tokens": [
|
| 120 |
+
"<|system|>",
|
| 121 |
+
"<|user|>",
|
| 122 |
+
"<|assistant|>",
|
| 123 |
+
"<|context|>",
|
| 124 |
+
"<|/context|>",
|
| 125 |
+
"[INST]",
|
| 126 |
+
"[/INST]",
|
| 127 |
+
"<|translate-en-el|>",
|
| 128 |
+
"<|translate-el-en|>",
|
| 129 |
+
"<|tldr|>"
|
| 130 |
+
],
|
| 131 |
+
"bos_token": "<s>",
|
| 132 |
+
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
| 133 |
+
"clean_up_tokenization_spaces": false,
|
| 134 |
+
"cls_token": "<s>",
|
| 135 |
+
"eos_token": "</s>",
|
| 136 |
+
"legacy": true,
|
| 137 |
+
"mask_token": "<unk>",
|
| 138 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 139 |
+
"pad_token": "<pad>",
|
| 140 |
+
"sep_token": "</s>",
|
| 141 |
+
"sp_model_kwargs": {},
|
| 142 |
+
"spaces_between_special_tokens": false,
|
| 143 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 144 |
+
"unk_token": "<unk>",
|
| 145 |
+
"use_default_system_prompt": false,
|
| 146 |
+
"use_fast": true
|
| 147 |
+
}
|