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
Trained with Unsloth
Browse files- config.json +4 -5
- generation_config.json +2 -1
- 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,7 +15,6 @@
|
|
| 15 |
"num_attention_heads": 32,
|
| 16 |
"num_hidden_layers": 32,
|
| 17 |
"num_key_value_heads": 8,
|
| 18 |
-
"pad_token_id": 2,
|
| 19 |
"rms_norm_eps": 1e-05,
|
| 20 |
"rope_theta": 10000.0,
|
| 21 |
"sliding_window": 4096,
|
|
@@ -23,6 +22,6 @@
|
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
"transformers_version": "4.39.0",
|
| 25 |
"unsloth_version": "2024.4",
|
| 26 |
-
"use_cache":
|
| 27 |
-
"vocab_size":
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "unsloth/Hermes-2-Pro-Mistral-7B-bnb-4bit",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 32000,
|
| 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 |
"rms_norm_eps": 1e-05,
|
| 19 |
"rope_theta": 10000.0,
|
| 20 |
"sliding_window": 4096,
|
|
|
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.39.0",
|
| 24 |
"unsloth_version": "2024.4",
|
| 25 |
+
"use_cache": false,
|
| 26 |
+
"vocab_size": 32032
|
| 27 |
}
|
generation_config.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
-
"
|
|
|
|
| 5 |
"transformers_version": "4.39.0"
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": 32000,
|
| 6 |
"transformers_version": "4.39.0"
|
| 7 |
}
|
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:97a74c3268cf773169ed1c207ecac6755aeb34c1641b20ab1f6210d363a6cf7b
|
| 3 |
+
size 4943424480
|
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:4447b5bc77adc79842909b069eaf5b55137b31f638e541fa6cd7482edea9cfd7
|
| 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:5dc7f0d5ea31f83d675b4832f4dcd987fbe5ac5a8cae2a5ad1c7f80f9535eff5
|
| 3 |
+
size 4540778488
|
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": 14483988480
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|