HuggingFaceFW/fineweb-edu
Viewer • Updated • 3.5B • 513k • 1.13k
How to use kz919/llama3_3b_cautious_chinchilla_8152025 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kz919/llama3_3b_cautious_chinchilla_8152025") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kz919/llama3_3b_cautious_chinchilla_8152025")
model = AutoModelForCausalLM.from_pretrained("kz919/llama3_3b_cautious_chinchilla_8152025")How to use kz919/llama3_3b_cautious_chinchilla_8152025 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kz919/llama3_3b_cautious_chinchilla_8152025"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kz919/llama3_3b_cautious_chinchilla_8152025",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/kz919/llama3_3b_cautious_chinchilla_8152025
How to use kz919/llama3_3b_cautious_chinchilla_8152025 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "kz919/llama3_3b_cautious_chinchilla_8152025" \
--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": "kz919/llama3_3b_cautious_chinchilla_8152025",
"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 "kz919/llama3_3b_cautious_chinchilla_8152025" \
--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": "kz919/llama3_3b_cautious_chinchilla_8152025",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use kz919/llama3_3b_cautious_chinchilla_8152025 with Docker Model Runner:
docker model run hf.co/kz919/llama3_3b_cautious_chinchilla_8152025
This model is a 3B llama3 model pretrained from scratch with torchtitan on fineweb-edu with C_AdamW optimizer. 20x chinchilla rule for 60B tokens seen.
import torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="kz919/llama3_3b_chinchilla_8142025",
)
print(pipe("The key to life is"))
lm_eval --model hf --model_args pretrained=kz919/llama3_3b_chinchilla_8142025,dtype="bfloat16",add_bos_token=True --tasks lambada_openai,hellaswag,piqa,arc_easy,arc_challenge,openbookqa --device cuda:7 --batch_size 8
| Tasks | Version | Filter | n-shot | Metric | Value | Stderr | ||
|---|---|---|---|---|---|---|---|---|
| arc_challenge | 1 | none | 0 | acc | ↑ | 0.2892 | ± | 0.0133 |
| none | 0 | acc_norm | ↑ | 0.2892 | ± | 0.0133 | ||
| arc_easy | 1 | none | 0 | acc | ↑ | 0.6162 | ± | 0.0100 |
| none | 0 | acc_norm | ↑ | 0.5311 | ± | 0.0102 | ||
| hellaswag | 1 | none | 0 | acc | ↑ | 0.3698 | ± | 0.0048 |
| none | 0 | acc_norm | ↑ | 0.4611 | ± | 0.0050 | ||
| lambada_openai | 1 | none | 0 | acc | ↑ | 0.3670 | ± | 0.0067 |
| none | 0 | perplexity | ↓ | 34.2265 | ± | 1.4167 | ||
| openbookqa | 1 | none | 0 | acc | ↑ | 0.2380 | ± | 0.0191 |
| none | 0 | acc_norm | ↑ | 0.3460 | ± | 0.0213 | ||
| piqa | 1 | none | 0 | acc | ↑ | 0.6904 | ± | 0.0108 |
| none | 0 | acc_norm | ↑ | 0.6975 | ± | 0.0107 |
| Groups | Version | Filter | n-shot | Metric | Value | Stderr | ||
|---|---|---|---|---|---|---|---|---|
| mmlu | 2 | none | acc | ↑ | 0.2453 | ± | 0.0036 | |
| - humanities | 2 | none | acc | ↑ | 0.2502 | ± | 0.0063 | |
| - other | 2 | none | acc | ↑ | 0.2620 | ± | 0.0079 | |
| - social sciences | 2 | none | acc | ↑ | 0.2320 | ± | 0.0076 | |
| - stem | 2 | none | acc | ↑ | 0.2347 | ± | 0.0076 |