Text Generation
Transformers
Safetensors
GGUF
mistral
unsloth
trl
sft
conversational
text-generation-inference
Instructions to use codingwithlewis/mistralmeme with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codingwithlewis/mistralmeme with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codingwithlewis/mistralmeme") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("codingwithlewis/mistralmeme") model = AutoModelForCausalLM.from_pretrained("codingwithlewis/mistralmeme") 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]:])) - llama-cpp-python
How to use codingwithlewis/mistralmeme with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="codingwithlewis/mistralmeme", filename="mistralmemes.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use codingwithlewis/mistralmeme with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf codingwithlewis/mistralmeme # Run inference directly in the terminal: llama-cli -hf codingwithlewis/mistralmeme
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf codingwithlewis/mistralmeme # Run inference directly in the terminal: llama-cli -hf codingwithlewis/mistralmeme
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf codingwithlewis/mistralmeme # Run inference directly in the terminal: ./llama-cli -hf codingwithlewis/mistralmeme
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf codingwithlewis/mistralmeme # Run inference directly in the terminal: ./build/bin/llama-cli -hf codingwithlewis/mistralmeme
Use Docker
docker model run hf.co/codingwithlewis/mistralmeme
- LM Studio
- Jan
- vLLM
How to use codingwithlewis/mistralmeme with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codingwithlewis/mistralmeme" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codingwithlewis/mistralmeme", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/codingwithlewis/mistralmeme
- SGLang
How to use codingwithlewis/mistralmeme 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 "codingwithlewis/mistralmeme" \ --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": "codingwithlewis/mistralmeme", "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 "codingwithlewis/mistralmeme" \ --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": "codingwithlewis/mistralmeme", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use codingwithlewis/mistralmeme with Ollama:
ollama run hf.co/codingwithlewis/mistralmeme
- Unsloth Studio new
How to use codingwithlewis/mistralmeme with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for codingwithlewis/mistralmeme to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for codingwithlewis/mistralmeme to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for codingwithlewis/mistralmeme to start chatting
- Docker Model Runner
How to use codingwithlewis/mistralmeme with Docker Model Runner:
docker model run hf.co/codingwithlewis/mistralmeme
- Lemonade
How to use codingwithlewis/mistralmeme with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull codingwithlewis/mistralmeme
Run and chat with the model
lemonade run user.mistralmeme-{{QUANT_TAG}}List all available models
lemonade list
Upload tokenizer
Browse files- special_tokens_map.json +1 -1
- tokenizer.json +2 -2
- tokenizer.model +2 -2
- tokenizer_config.json +4 -8
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": "<|im_end|>",
|
| 11 |
"lstrip": false,
|
| 12 |
"normalized": false,
|
| 13 |
"rstrip": false,
|
tokenizer.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
},
|
| 24 |
{
|
| 25 |
"id": 2,
|
| 26 |
-
"content": "<
|
| 27 |
"single_word": false,
|
| 28 |
"lstrip": false,
|
| 29 |
"rstrip": false,
|
|
@@ -137,7 +137,7 @@
|
|
| 137 |
"vocab": {
|
| 138 |
"<unk>": 0,
|
| 139 |
"<s>": 1,
|
| 140 |
-
"<
|
| 141 |
"<0x00>": 3,
|
| 142 |
"<0x01>": 4,
|
| 143 |
"<0x02>": 5,
|
|
|
|
| 23 |
},
|
| 24 |
{
|
| 25 |
"id": 2,
|
| 26 |
+
"content": "<|im_end|>",
|
| 27 |
"single_word": false,
|
| 28 |
"lstrip": false,
|
| 29 |
"rstrip": false,
|
|
|
|
| 137 |
"vocab": {
|
| 138 |
"<unk>": 0,
|
| 139 |
"<s>": 1,
|
| 140 |
+
"<|im_end|>": 2,
|
| 141 |
"<0x00>": 3,
|
| 142 |
"<0x01>": 4,
|
| 143 |
"<0x02>": 5,
|
tokenizer.model
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc460a0129515b7579ec9f63218012601729de4fbd1b5de8d56dc47e8a204a29
|
| 3 |
+
size 493449
|
tokenizer_config.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 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>",
|
|
@@ -20,7 +19,7 @@
|
|
| 20 |
"special": true
|
| 21 |
},
|
| 22 |
"2": {
|
| 23 |
-
"content": "<
|
| 24 |
"lstrip": false,
|
| 25 |
"normalized": false,
|
| 26 |
"rstrip": false,
|
|
@@ -29,14 +28,11 @@
|
|
| 29 |
}
|
| 30 |
},
|
| 31 |
"bos_token": "<s>",
|
|
|
|
| 32 |
"clean_up_tokenization_spaces": false,
|
| 33 |
-
"eos_token": "<
|
| 34 |
-
"
|
| 35 |
-
"model_max_length": 32768,
|
| 36 |
"pad_token": "<unk>",
|
| 37 |
-
"padding_side": "left",
|
| 38 |
-
"sp_model_kwargs": {},
|
| 39 |
-
"spaces_between_special_tokens": false,
|
| 40 |
"tokenizer_class": "LlamaTokenizer",
|
| 41 |
"unk_token": "<unk>",
|
| 42 |
"use_default_system_prompt": false
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
"add_eos_token": false,
|
|
|
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 19 |
"special": true
|
| 20 |
},
|
| 21 |
"2": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
"lstrip": false,
|
| 24 |
"normalized": false,
|
| 25 |
"rstrip": false,
|
|
|
|
| 28 |
}
|
| 29 |
},
|
| 30 |
"bos_token": "<s>",
|
| 31 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'user' %}{{'<|im_start|>user\n' + message['content'] + '<|im_end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|im_start|>assistant\n' + message['content'] + '<|im_end|>\n' }}{% else %}{{ '<|im_start|>system\n' + message['content'] + '<|im_end|>\n' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 32 |
"clean_up_tokenization_spaces": false,
|
| 33 |
+
"eos_token": "<|im_end|>",
|
| 34 |
+
"model_max_length": 1000000000000000019884624838656,
|
|
|
|
| 35 |
"pad_token": "<unk>",
|
|
|
|
|
|
|
|
|
|
| 36 |
"tokenizer_class": "LlamaTokenizer",
|
| 37 |
"unk_token": "<unk>",
|
| 38 |
"use_default_system_prompt": false
|