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", 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
- llama.cpp
How to use codingwithlewis/mistralmeme with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -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 serve -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
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
- Atomic Chat
Trained with Unsloth
Browse files- config.json +8 -7
- generation_config.json +2 -3
- model-00001-of-00003.safetensors +2 -2
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +2 -2
- model.safetensors.index.json +1 -1
config.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "unsloth/
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"bos_token_id": 1,
|
| 8 |
-
"eos_token_id":
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 4096,
|
| 11 |
"initializer_range": 0.02,
|
|
@@ -15,13 +15,14 @@
|
|
| 15 |
"num_attention_heads": 32,
|
| 16 |
"num_hidden_layers": 32,
|
| 17 |
"num_key_value_heads": 8,
|
|
|
|
| 18 |
"rms_norm_eps": 1e-05,
|
| 19 |
-
"rope_theta":
|
| 20 |
-
"sliding_window":
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
-
"transformers_version": "4.39.
|
| 24 |
"unsloth_version": "2024.4",
|
| 25 |
-
"use_cache":
|
| 26 |
-
"vocab_size":
|
| 27 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "unsloth/mistral-7b-v0.2-bnb-4bit",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 4096,
|
| 11 |
"initializer_range": 0.02,
|
|
|
|
| 15 |
"num_attention_heads": 32,
|
| 16 |
"num_hidden_layers": 32,
|
| 17 |
"num_key_value_heads": 8,
|
| 18 |
+
"pad_token_id": 0,
|
| 19 |
"rms_norm_eps": 1e-05,
|
| 20 |
+
"rope_theta": 1000000.0,
|
| 21 |
+
"sliding_window": 32768,
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
+
"transformers_version": "4.39.3",
|
| 25 |
"unsloth_version": "2024.4",
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 32000
|
| 28 |
}
|
generation_config.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"transformers_version": "4.39.0"
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.39.3"
|
|
|
|
| 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
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c55348e63bcdfc7ca4bc4c3f82f537d6139d6ff0d6cbf8a368c26759d99e630
|
| 3 |
+
size 4943162336
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f533d427b79a1d266e72d80ea170a0f228ea53e0a4f98de098fb2f45ff2a46b2
|
| 3 |
size 4999819336
|
model-00003-of-00003.safetensors
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:523f3fb86308bb45649901ae19bc4685103a4b85353f02488b06ada7cc4b45fd
|
| 3 |
+
size 4540516344
|
model.safetensors.index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 14483464192
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|