Mist Models
Collection
5 items β’ Updated
How to use olaverse/MIST-1-140B-4bit with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="olaverse/MIST-1-140B-4bit")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("olaverse/MIST-1-140B-4bit")
model = AutoModelForCausalLM.from_pretrained("olaverse/MIST-1-140B-4bit")
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]:]))How to use olaverse/MIST-1-140B-4bit with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "olaverse/MIST-1-140B-4bit"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "olaverse/MIST-1-140B-4bit",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/olaverse/MIST-1-140B-4bit
How to use olaverse/MIST-1-140B-4bit with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "olaverse/MIST-1-140B-4bit" \
--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": "olaverse/MIST-1-140B-4bit",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "olaverse/MIST-1-140B-4bit" \
--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": "olaverse/MIST-1-140B-4bit",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use olaverse/MIST-1-140B-4bit with Docker Model Runner:
docker model run hf.co/olaverse/MIST-1-140B-4bit
4-bit NF4 quantized version of MIST-1-140B. Runs on a single H100/H200 GPU using only ~70GB VRAM instead of 280GB. Model is experimental
| Model | Params | VRAM | Speed | Status |
|---|---|---|---|---|
| MIST-1-8B | 8B | 16GB | ~63 tok/s | β |
| MIST-1-70B | 70B | 140GB | ~23 tok/s | β |
| MIST-1-140B | 140B | 280GB | ~8 tok/s | β |
| MIST-1-140B-4bit | 140B | 70GB | ~8 tok/s | β |
| Property | Value |
|---|---|
| Method | BitsAndBytes NF4 |
| Compute dtype | bfloat16 |
| Double quantization | Yes |
| Original size | 256GB |
| Quantized size | 69GB |
| Quality retention | ~97-98% |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type='nf4'
)
model = AutoModelForCausalLM.from_pretrained(
"olaverse/MIST-1-140B-4bit",
quantization_config=quantization_config,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("olaverse/MIST-1-140B-4bit")
messages = [{"role": "user", "content": "Your question here"}]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
messages = [
{
"role": "system",
"content": "You are MIST, a highly capable AI assistant. Think step by step before answering."
},
{"role": "user", "content": "Your question here"}
]
| VRAM | Speed |
|---|---|
| 70GB (1x H200/H100) | ~8 tok/s |
| 140GB (1x H200) | ~8 tok/s with headroom |