kanishka/babylm2-subset
Viewer • Updated • 9.27M • 8
How to use kanishka/opt-babylm2-subset-default-1e-3 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kanishka/opt-babylm2-subset-default-1e-3") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kanishka/opt-babylm2-subset-default-1e-3")
model = AutoModelForCausalLM.from_pretrained("kanishka/opt-babylm2-subset-default-1e-3")How to use kanishka/opt-babylm2-subset-default-1e-3 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kanishka/opt-babylm2-subset-default-1e-3"
# 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-1e-3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/kanishka/opt-babylm2-subset-default-1e-3
How to use kanishka/opt-babylm2-subset-default-1e-3 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-1e-3" \
--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-1e-3",
"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-1e-3" \
--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-1e-3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use kanishka/opt-babylm2-subset-default-1e-3 with Docker Model Runner:
docker model run hf.co/kanishka/opt-babylm2-subset-default-1e-3
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.5477 | 1.0 | 14142 | 2.7490 | 0.4855 |
| 2.377 | 2.0 | 28284 | 2.5803 | 0.5045 |
| 2.2625 | 3.0 | 42426 | 2.4760 | 0.5164 |
| 2.1715 | 4.0 | 56568 | 2.4206 | 0.5235 |
| 2.0996 | 5.0 | 70710 | 2.3880 | 0.5278 |
| 2.0456 | 6.0 | 84852 | 2.3722 | 0.5306 |
| 1.9983 | 7.0 | 98994 | 2.3592 | 0.5327 |
| 1.9482 | 8.0 | 113136 | 2.3579 | 0.5338 |
| 1.9061 | 9.0 | 127278 | 2.3605 | 0.5346 |
| 1.8692 | 10.0 | 141420 | 2.3689 | 0.5348 |