Mixsmol
Collection
Smol MoE series - in collaboration with Ontocord • 3 items • Updated
How to use vilm/Mixsmol-4x400M-v0.1-epoch2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="vilm/Mixsmol-4x400M-v0.1-epoch2") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("vilm/Mixsmol-4x400M-v0.1-epoch2")
model = AutoModelForCausalLM.from_pretrained("vilm/Mixsmol-4x400M-v0.1-epoch2", device_map="auto")How to use vilm/Mixsmol-4x400M-v0.1-epoch2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "vilm/Mixsmol-4x400M-v0.1-epoch2"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vilm/Mixsmol-4x400M-v0.1-epoch2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/vilm/Mixsmol-4x400M-v0.1-epoch2
How to use vilm/Mixsmol-4x400M-v0.1-epoch2 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "vilm/Mixsmol-4x400M-v0.1-epoch2" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vilm/Mixsmol-4x400M-v0.1-epoch2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "vilm/Mixsmol-4x400M-v0.1-epoch2" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "vilm/Mixsmol-4x400M-v0.1-epoch2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use vilm/Mixsmol-4x400M-v0.1-epoch2 with Docker Model Runner:
docker model run hf.co/vilm/Mixsmol-4x400M-v0.1-epoch2
This is the first checkpoint (Epoch 1) of Mixsmol-4x400M-v0.1 Note that this is an experimental in data mixing. Therefore, we only trained the model on 50B tokens (95% English and 5% Vietnamese) to test the following:
After verifying our hypothesis with this run, we will schedule a second run on bigger data and compute for it to achieve its maximum capability.