Instructions to use TroyDoesAI/MermaidMistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TroyDoesAI/MermaidMistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TroyDoesAI/MermaidMistral") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TroyDoesAI/MermaidMistral") model = AutoModelForCausalLM.from_pretrained("TroyDoesAI/MermaidMistral") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TroyDoesAI/MermaidMistral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TroyDoesAI/MermaidMistral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TroyDoesAI/MermaidMistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TroyDoesAI/MermaidMistral
- SGLang
How to use TroyDoesAI/MermaidMistral 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 "TroyDoesAI/MermaidMistral" \ --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": "TroyDoesAI/MermaidMistral", "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 "TroyDoesAI/MermaidMistral" \ --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": "TroyDoesAI/MermaidMistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TroyDoesAI/MermaidMistral with Docker Model Runner:
docker model run hf.co/TroyDoesAI/MermaidMistral
Upload 10 files
Browse filesMerge of all my mistral models, after testing this model is the most easy to use, not the most capable but is really easy for people to prompt as it seems I am really good at prompting what I want because I wrote the dataset lol. Sorry guys. This one should be more aligned.
- config.json +2 -2
- generation_config.json +1 -1
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
- special_tokens_map.json +12 -0
- tokenizer_config.json +13 -4
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": ".\\MermaidMistral
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
|
@@ -20,7 +20,7 @@
|
|
| 20 |
"sliding_window": 4096,
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "float16",
|
| 23 |
-
"transformers_version": "4.
|
| 24 |
"use_cache": true,
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": ".\\MermaidMistral",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
|
|
|
| 20 |
"sliding_window": 4096,
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "float16",
|
| 23 |
+
"transformers_version": "4.37.2",
|
| 24 |
"use_cache": true,
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.37.2"
|
| 6 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4943162240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a156eea914666e2b80bc191ddb570f61e87056c14eb87d86e1fffee30c6c42d8
|
| 3 |
size 4943162240
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819232
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:daccbd2e4b4d06fe7200e8ede94da165c4220f40ad340ec3563178d4766a9b3d
|
| 3 |
size 4999819232
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4540516256
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65709c124780b704b418e9d5c20db825fb7157d4effeddf92af28c102fa5860d
|
| 3 |
size 4540516256
|
special_tokens_map.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"bos_token": {
|
| 3 |
"content": "<s>",
|
| 4 |
"lstrip": false,
|
|
@@ -13,6 +18,13 @@
|
|
| 13 |
"rstrip": false,
|
| 14 |
"single_word": false
|
| 15 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
"unk_token": {
|
| 17 |
"content": "<unk>",
|
| 18 |
"lstrip": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<unk>",
|
| 4 |
+
"<s>",
|
| 5 |
+
"</s>"
|
| 6 |
+
],
|
| 7 |
"bos_token": {
|
| 8 |
"content": "<s>",
|
| 9 |
"lstrip": false,
|
|
|
|
| 18 |
"rstrip": false,
|
| 19 |
"single_word": false
|
| 20 |
},
|
| 21 |
+
"pad_token": {
|
| 22 |
+
"content": "</s>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false
|
| 27 |
+
},
|
| 28 |
"unk_token": {
|
| 29 |
"content": "<unk>",
|
| 30 |
"lstrip": false,
|
tokenizer_config.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
| 2 |
"added_tokens_decoder": {
|
| 3 |
"0": {
|
| 4 |
"content": "<unk>",
|
|
@@ -25,16 +27,23 @@
|
|
| 25 |
"special": true
|
| 26 |
}
|
| 27 |
},
|
| 28 |
-
"additional_special_tokens": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
"bos_token": "<s>",
|
|
|
|
| 30 |
"clean_up_tokenization_spaces": false,
|
| 31 |
"eos_token": "</s>",
|
| 32 |
"legacy": true,
|
| 33 |
-
"model_max_length":
|
| 34 |
-
"pad_token":
|
|
|
|
| 35 |
"sp_model_kwargs": {},
|
| 36 |
"spaces_between_special_tokens": false,
|
|
|
|
| 37 |
"tokenizer_class": "LlamaTokenizer",
|
| 38 |
"unk_token": "<unk>",
|
| 39 |
-
"use_default_system_prompt":
|
| 40 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 27 |
"special": true
|
| 28 |
}
|
| 29 |
},
|
| 30 |
+
"additional_special_tokens": [
|
| 31 |
+
"<unk>",
|
| 32 |
+
"<s>",
|
| 33 |
+
"</s>"
|
| 34 |
+
],
|
| 35 |
"bos_token": "<s>",
|
| 36 |
+
"chat_template": "{% for message in messages %}{{bos_token + message['role'] + '\n' + message['content'] + eos_token + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ bos_token + 'assistant\n' }}{% endif %}",
|
| 37 |
"clean_up_tokenization_spaces": false,
|
| 38 |
"eos_token": "</s>",
|
| 39 |
"legacy": true,
|
| 40 |
+
"model_max_length": 8192,
|
| 41 |
+
"pad_token": "</s>",
|
| 42 |
+
"padding_side": "left",
|
| 43 |
"sp_model_kwargs": {},
|
| 44 |
"spaces_between_special_tokens": false,
|
| 45 |
+
"split_special_tokens": false,
|
| 46 |
"tokenizer_class": "LlamaTokenizer",
|
| 47 |
"unk_token": "<unk>",
|
| 48 |
+
"use_default_system_prompt": true
|
| 49 |
}
|