Instructions to use HachiML/Llama2-jp-127M-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HachiML/Llama2-jp-127M-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HachiML/Llama2-jp-127M-2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HachiML/Llama2-jp-127M-2") model = AutoModelForCausalLM.from_pretrained("HachiML/Llama2-jp-127M-2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HachiML/Llama2-jp-127M-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HachiML/Llama2-jp-127M-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HachiML/Llama2-jp-127M-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HachiML/Llama2-jp-127M-2
- SGLang
How to use HachiML/Llama2-jp-127M-2 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/Llama2-jp-127M-2" \ --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/Llama2-jp-127M-2", "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/Llama2-jp-127M-2" \ --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/Llama2-jp-127M-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HachiML/Llama2-jp-127M-2 with Docker Model Runner:
docker model run hf.co/HachiML/Llama2-jp-127M-2
Llama2-jp-127M-2
This model is a fine-tuned version of on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.5366
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.0024
- train_batch_size: 192
- eval_batch_size: 192
- seed: 42
- optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 2500
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 4.5846 | 0.05 | 1000 | 3.5530 |
| 3.3978 | 0.1 | 2000 | 3.3095 |
| 3.2474 | 0.15 | 3000 | 3.1697 |
| 3.1079 | 0.2 | 4000 | 3.0595 |
| 3.0201 | 0.25 | 5000 | 2.9864 |
| 2.9566 | 0.29 | 6000 | 2.9366 |
| 2.9115 | 0.34 | 7000 | 2.8954 |
| 2.8732 | 0.39 | 8000 | 2.8627 |
| 2.8423 | 0.44 | 9000 | 2.8328 |
| 2.8131 | 0.49 | 10000 | 2.8052 |
| 2.7855 | 0.54 | 11000 | 2.7809 |
| 2.7623 | 0.59 | 12000 | 2.7551 |
| 2.737 | 0.64 | 13000 | 2.7301 |
| 2.7102 | 0.69 | 14000 | 2.7039 |
| 2.686 | 0.74 | 15000 | 2.6771 |
| 2.6554 | 0.79 | 16000 | 2.6495 |
| 2.6273 | 0.83 | 17000 | 2.6208 |
| 2.5984 | 0.88 | 18000 | 2.5911 |
| 2.5693 | 0.93 | 19000 | 2.5611 |
| 2.5391 | 0.98 | 20000 | 2.5366 |
Framework versions
- Transformers 4.39.2
- Pytorch 2.2.1+cu121
- Datasets 2.18.0
- Tokenizers 0.15.2
- Downloads last month
- 5