JeanKaddour/minipile
Viewer • Updated • 1.01M • 4.64k • 146
How to use BEE-spoke-data/smol_llama-81M-tied with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="BEE-spoke-data/smol_llama-81M-tied") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("BEE-spoke-data/smol_llama-81M-tied")
model = AutoModelForCausalLM.from_pretrained("BEE-spoke-data/smol_llama-81M-tied")How to use BEE-spoke-data/smol_llama-81M-tied with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "BEE-spoke-data/smol_llama-81M-tied"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "BEE-spoke-data/smol_llama-81M-tied",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/BEE-spoke-data/smol_llama-81M-tied
How to use BEE-spoke-data/smol_llama-81M-tied with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "BEE-spoke-data/smol_llama-81M-tied" \
--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": "BEE-spoke-data/smol_llama-81M-tied",
"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 "BEE-spoke-data/smol_llama-81M-tied" \
--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": "BEE-spoke-data/smol_llama-81M-tied",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use BEE-spoke-data/smol_llama-81M-tied with Docker Model Runner:
docker model run hf.co/BEE-spoke-data/smol_llama-81M-tied
A small 81M param (total) decoder model, enabled through tying the input/output embeddings. This is the first version of the model.
This checkpoint is the 'raw' pre-trained model and has not been tuned to a more specific task. It should be fine-tuned before use in most cases.
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 24.52 |
| ARC (25-shot) | 22.18 |
| HellaSwag (10-shot) | 29.33 |
| MMLU (5-shot) | 24.06 |
| TruthfulQA (0-shot) | 43.97 |
| Winogrande (5-shot) | 49.25 |
| GSM8K (5-shot) | 0.23 |
| DROP (3-shot) | 2.64 |