Instructions to use w-ahmad/tiny-llama-3-relu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use w-ahmad/tiny-llama-3-relu with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="w-ahmad/tiny-llama-3-relu") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("w-ahmad/tiny-llama-3-relu", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use w-ahmad/tiny-llama-3-relu with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "w-ahmad/tiny-llama-3-relu" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "w-ahmad/tiny-llama-3-relu", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/w-ahmad/tiny-llama-3-relu
- SGLang
How to use w-ahmad/tiny-llama-3-relu 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 "w-ahmad/tiny-llama-3-relu" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "w-ahmad/tiny-llama-3-relu", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "w-ahmad/tiny-llama-3-relu" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "w-ahmad/tiny-llama-3-relu", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use w-ahmad/tiny-llama-3-relu with Docker Model Runner:
docker model run hf.co/w-ahmad/tiny-llama-3-relu
tiny-llama-3-relu
This model is a fine-tuned version of on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 1.3448
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.0003
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 64
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: constant
- training_steps: 10000
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 4.7466 | 0.0319 | 500 | 2.3445 |
| 3.8322 | 0.0637 | 1000 | 1.9124 |
| 3.4850 | 0.0956 | 1500 | 1.7444 |
| 3.3109 | 0.1274 | 2000 | 1.6543 |
| 3.1761 | 0.1593 | 2500 | 1.5934 |
| 3.0842 | 0.1911 | 3000 | 1.5510 |
| 3.0527 | 0.2230 | 3500 | 1.5208 |
| 2.9735 | 0.2548 | 4000 | 1.4916 |
| 2.9263 | 0.2867 | 4500 | 1.4705 |
| 2.8899 | 0.3185 | 5000 | 1.4522 |
| 2.8697 | 0.3504 | 5500 | 1.4347 |
| 2.8389 | 0.3823 | 6000 | 1.4212 |
| 2.8109 | 0.4141 | 6500 | 1.4078 |
| 2.7935 | 0.4460 | 7000 | 1.3972 |
| 2.7701 | 0.4778 | 7500 | 1.3853 |
| 2.7457 | 0.5097 | 8000 | 1.3772 |
| 2.7358 | 0.5415 | 8500 | 1.3679 |
| 2.7298 | 0.5734 | 9000 | 1.3606 |
| 2.6985 | 0.6052 | 9500 | 1.3523 |
| 2.6766 | 0.6371 | 10000 | 1.3448 |
Framework versions
- Transformers 5.15.0.dev0
- Pytorch 2.6.0+cu124
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 10