Instructions to use HachiML/TinyLlama2-jp-122M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HachiML/TinyLlama2-jp-122M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HachiML/TinyLlama2-jp-122M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HachiML/TinyLlama2-jp-122M") model = AutoModelForCausalLM.from_pretrained("HachiML/TinyLlama2-jp-122M") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HachiML/TinyLlama2-jp-122M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HachiML/TinyLlama2-jp-122M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HachiML/TinyLlama2-jp-122M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HachiML/TinyLlama2-jp-122M
- SGLang
How to use HachiML/TinyLlama2-jp-122M 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 "HachiML/TinyLlama2-jp-122M" \ --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": "HachiML/TinyLlama2-jp-122M", "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 "HachiML/TinyLlama2-jp-122M" \ --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": "HachiML/TinyLlama2-jp-122M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HachiML/TinyLlama2-jp-122M with Docker Model Runner:
docker model run hf.co/HachiML/TinyLlama2-jp-122M
TinyLlama2-jp
This model is a fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 3.2892
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.0005
- train_batch_size: 156
- eval_batch_size: 156
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 200
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 7.4756 | 0.06 | 100 | 5.4296 |
| 4.936 | 0.12 | 200 | 4.5938 |
| 4.3958 | 0.18 | 300 | 4.2302 |
| 4.1193 | 0.24 | 400 | 4.0358 |
| 3.9439 | 0.3 | 500 | 3.8978 |
| 3.8234 | 0.36 | 600 | 3.7824 |
| 3.714 | 0.41 | 700 | 3.6923 |
| 3.6277 | 0.47 | 800 | 3.6110 |
| 3.5376 | 0.53 | 900 | 3.5401 |
| 3.4791 | 0.59 | 1000 | 3.4743 |
| 3.4058 | 0.65 | 1100 | 3.4219 |
| 3.3582 | 0.71 | 1200 | 3.3737 |
| 3.3272 | 0.77 | 1300 | 3.3387 |
| 3.2892 | 0.83 | 1400 | 3.3123 |
| 3.2655 | 0.89 | 1500 | 3.2962 |
| 3.2511 | 0.95 | 1600 | 3.2892 |
Framework versions
- Transformers 4.38.2
- Pytorch 2.1.0+cu121
- Datasets 2.18.0
- Tokenizers 0.15.2
- Downloads last month
- 9