kanishka/babylm2-clean-spacy
Viewer โข Updated โข 13.3M โข 18
How to use kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3")
model = AutoModelForCausalLM.from_pretrained("kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3", device_map="auto")How to use kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_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-clean-spacy-earlystop-bpe_seed-211_1e-3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3
How to use kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_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-clean-spacy-earlystop-bpe_seed-211_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-clean-spacy-earlystop-bpe_seed-211_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-clean-spacy-earlystop-bpe_seed-211_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-clean-spacy-earlystop-bpe_seed-211_1e-3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3 with Docker Model Runner:
docker model run hf.co/kanishka/opt-babylm2-clean-spacy-earlystop-bpe_seed-211_1e-3
This model was trained from scratch on the kanishka/babylm2-clean-spacy 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 |
|---|---|---|---|---|
| 4.0925 | 1.0 | 2264 | 3.8114 | 0.3607 |
| 3.4547 | 2.0 | 4528 | 3.3029 | 0.4088 |
| 3.1308 | 3.0 | 6792 | 3.0892 | 0.4297 |
| 2.9202 | 4.0 | 9056 | 2.9797 | 0.4409 |
| 2.838 | 5.0 | 11320 | 2.9200 | 0.4472 |
| 2.7829 | 6.0 | 13584 | 2.8833 | 0.4511 |
| 2.7376 | 7.0 | 15848 | 2.8527 | 0.4547 |
| 2.707 | 8.0 | 18112 | 2.8312 | 0.4571 |
| 2.6841 | 9.0 | 20376 | 2.8202 | 0.4586 |
| 2.6621 | 10.0 | 22640 | 2.8073 | 0.4599 |
| 2.6417 | 11.0 | 24904 | 2.7996 | 0.4605 |
| 2.6427 | 12.0 | 27168 | 2.7924 | 0.4616 |
| 2.6312 | 13.0 | 29432 | 2.7864 | 0.4622 |
| 2.6218 | 14.0 | 31696 | 2.7867 | 0.4624 |
| 2.6024 | 15.0 | 33960 | 2.7614 | 0.4656 |
| 2.5607 | 16.0 | 36224 | 2.7356 | 0.4692 |
| 2.5117 | 17.0 | 38488 | 2.7129 | 0.4720 |
| 2.4557 | 18.0 | 40752 | 2.6935 | 0.4752 |
| 2.3912 | 19.0 | 43016 | 2.6783 | 0.4777 |
| 2.3218 | 19.9914 | 45260 | 2.6756 | 0.4792 |