kanishka/babylm2-subset
Viewer • Updated • 9.27M • 6
How to use kanishka/opt-babylm2-subset-default-3e-4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kanishka/opt-babylm2-subset-default-3e-4") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kanishka/opt-babylm2-subset-default-3e-4")
model = AutoModelForCausalLM.from_pretrained("kanishka/opt-babylm2-subset-default-3e-4")How to use kanishka/opt-babylm2-subset-default-3e-4 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kanishka/opt-babylm2-subset-default-3e-4"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "kanishka/opt-babylm2-subset-default-3e-4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/kanishka/opt-babylm2-subset-default-3e-4
How to use kanishka/opt-babylm2-subset-default-3e-4 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "kanishka/opt-babylm2-subset-default-3e-4" \
--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": "kanishka/opt-babylm2-subset-default-3e-4",
"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 "kanishka/opt-babylm2-subset-default-3e-4" \
--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": "kanishka/opt-babylm2-subset-default-3e-4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use kanishka/opt-babylm2-subset-default-3e-4 with Docker Model Runner:
docker model run hf.co/kanishka/opt-babylm2-subset-default-3e-4
This model was trained from scratch on the kanishka/babylm2-subset dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 2.6575 | 1.0 | 14169 | 2.8571 | 0.4750 |
| 2.4179 | 2.0 | 28338 | 2.6258 | 0.4990 |
| 2.286 | 3.0 | 42507 | 2.5088 | 0.5123 |
| 2.2124 | 4.0 | 56676 | 2.4448 | 0.5203 |
| 2.1307 | 5.0 | 70845 | 2.4099 | 0.5251 |
| 2.0706 | 6.0 | 85014 | 2.3887 | 0.5281 |
| 2.0233 | 7.0 | 99183 | 2.3779 | 0.5304 |
| 1.9727 | 8.0 | 113352 | 2.3731 | 0.5315 |
| 1.9311 | 9.0 | 127521 | 2.3728 | 0.5324 |
| 1.8943 | 10.0 | 141690 | 2.3776 | 0.5327 |