Instructions to use stage-babylm/llama-384-2L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stage-babylm/llama-384-2L with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stage-babylm/llama-384-2L")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("stage-babylm/llama-384-2L") model = AutoModelForCausalLM.from_pretrained("stage-babylm/llama-384-2L", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stage-babylm/llama-384-2L with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stage-babylm/llama-384-2L" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stage-babylm/llama-384-2L", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/stage-babylm/llama-384-2L
- SGLang
How to use stage-babylm/llama-384-2L with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "stage-babylm/llama-384-2L" \ --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": "stage-babylm/llama-384-2L", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
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 "stage-babylm/llama-384-2L" \ --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": "stage-babylm/llama-384-2L", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use stage-babylm/llama-384-2L with Docker Model Runner:
docker model run hf.co/stage-babylm/llama-384-2L
llama-384-2L
This model is a fine-tuned version of on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 1.8333
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0018
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.95) and epsilon=1e-06 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 0.05
- num_epochs: 1.0
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0 | 0 | 7.0349 |
| 2.4697 | 0.0500 | 2014 | 2.4815 |
| 2.2635 | 0.1000 | 4028 | 2.2710 |
| 2.1830 | 0.1500 | 6042 | 2.2005 |
| 2.1399 | 0.2000 | 8056 | 2.1578 |
| 2.1159 | 0.2500 | 10070 | 2.1327 |
| 2.0902 | 0.3000 | 12084 | 2.1055 |
| 2.0639 | 0.3500 | 14098 | 2.0874 |
| 2.0411 | 0.4000 | 16112 | 2.0657 |
| 2.0331 | 0.4500 | 18126 | 2.0439 |
| 2.0017 | 0.5000 | 20140 | 2.0208 |
| 1.9845 | 0.5500 | 22154 | 2.0019 |
| 1.9460 | 0.6000 | 24168 | 1.9757 |
| 1.9353 | 0.6500 | 26182 | 1.9508 |
| 1.9098 | 0.7000 | 28196 | 1.9261 |
| 1.8752 | 0.7500 | 30210 | 1.8980 |
| 1.8505 | 0.8000 | 32224 | 1.8769 |
| 1.8389 | 0.8500 | 34238 | 1.8563 |
| 1.8194 | 0.9000 | 36252 | 1.8422 |
| 1.8118 | 0.9500 | 38266 | 1.8350 |
| 1.8058 | 1.0 | 40278 | 1.8333 |
Framework versions
- Transformers 5.14.1
- Pytorch 2.13.0+cu130
- Datasets 5.0.0
- Tokenizers 0.22.2
- Downloads last month
- 48