HuggingFaceFW/fineweb-edu
Viewer β’ Updated β’ 3.5B β’ 386k β’ 1.26k
How to use mikecovlee/tinymixtral-1B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mikecovlee/tinymixtral-1B", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("mikecovlee/tinymixtral-1B", trust_remote_code=True, device_map="auto")How to use mikecovlee/tinymixtral-1B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mikecovlee/tinymixtral-1B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mikecovlee/tinymixtral-1B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/mikecovlee/tinymixtral-1B
How to use mikecovlee/tinymixtral-1B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mikecovlee/tinymixtral-1B" \
--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": "mikecovlee/tinymixtral-1B",
"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 "mikecovlee/tinymixtral-1B" \
--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": "mikecovlee/tinymixtral-1B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use mikecovlee/tinymixtral-1B with Docker Model Runner:
docker model run hf.co/mikecovlee/tinymixtral-1B
A 1.18B-parameter Mixture-of-Experts language model (351M active), post-trained on 1B tokens of educational and web text.
| Property | Value |
|---|---|
| Architecture | Decoder-only Transformer with Sparse MoE |
| Total Parameters | 1,182,172,160 |
| Active Parameters | ~351M |
| Hidden Size | 1024 |
| Layers | 16 |
| Experts | 8 (top-2 routing) |
| Attention Heads | 16 query / 4 key-value (GQA) |
| Head Dimension | 64 |
| Intermediate Size | 2,816 (per expert) |
| Vocabulary | 32,000 |
| Context Length | 2,048 |
| Position Encoding | RoPE (theta=1e6) |
| Activation | SiLU |
| Norm | RMSNorm |
| Tied Embeddings | Yes |
Pre-training (4B tokens):
Post-training (1B tokens):
| Benchmark | Score |
|---|---|
| HellaSwag (acc_norm) | 0.313 |
| PIQA (acc) | 0.609 |
| Winogrande (acc) | 0.505 |
| ARC-Easy (acc_norm) | 0.410 |
| ARC-Challenge (acc_norm) | 0.272 |
| OpenBookQA (acc_norm) | 0.290 |
| BoolQ (acc) | 0.528 |
| LAMBADA (acc) | 0.195 |
| Model | inst_strict |
|---|---|
| 1B post-train | 0.2338 |
| v1.1 | 0.2182 |
| Model | ROUGE-1 | ROUGE-2 | ROUGE-L |
|---|---|---|---|
| 1B (0-shot) | 9.83 | 0.50 | 7.85 |
| 1B (fine-tuned, 15ep) | 28.82 | 8.55 | 24.08 |
| T5-small (60M) | 35.7 | 13.4 | 31.4 |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"publish_posttrain/",
trust_remote_code=True,
torch_dtype="bfloat16",
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("publish_posttrain/", legacy=False)
prompt = "The capital of France is"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=20, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))
MIT License. See LICENSE for details.