Instructions to use HachiML/Llama2-jp-127M-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HachiML/Llama2-jp-127M-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HachiML/Llama2-jp-127M-1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HachiML/Llama2-jp-127M-1") model = AutoModelForCausalLM.from_pretrained("HachiML/Llama2-jp-127M-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HachiML/Llama2-jp-127M-1 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-1" # 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-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HachiML/Llama2-jp-127M-1
- SGLang
How to use HachiML/Llama2-jp-127M-1 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-1" \ --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-1", "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-1" \ --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-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HachiML/Llama2-jp-127M-1 with Docker Model Runner:
docker model run hf.co/HachiML/Llama2-jp-127M-1
Llama2-jp-127M-1
This model is a fine-tuned version of on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.5952
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: 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 |
|---|---|---|---|
| 5.7237 | 0.05 | 1000 | 4.2083 |
| 3.8416 | 0.1 | 2000 | 3.5695 |
| 3.3855 | 0.15 | 3000 | 3.2431 |
| 3.1569 | 0.2 | 4000 | 3.0882 |
| 3.0382 | 0.25 | 5000 | 2.9939 |
| 2.9565 | 0.29 | 6000 | 2.9292 |
| 2.8993 | 0.34 | 7000 | 2.8790 |
| 2.8531 | 0.39 | 8000 | 2.8402 |
| 2.8166 | 0.44 | 9000 | 2.8057 |
| 2.7839 | 0.49 | 10000 | 2.7767 |
| 2.7553 | 0.54 | 11000 | 2.7497 |
| 2.7324 | 0.59 | 12000 | 2.7270 |
| 2.7098 | 0.64 | 13000 | 2.7056 |
| 2.6879 | 0.69 | 14000 | 2.6846 |
| 2.6703 | 0.74 | 15000 | 2.6657 |
| 2.6492 | 0.79 | 16000 | 2.6483 |
| 2.6324 | 0.83 | 17000 | 2.6322 |
| 2.6176 | 0.88 | 18000 | 2.6175 |
| 2.6045 | 0.93 | 19000 | 2.6044 |
| 2.591 | 0.98 | 20000 | 2.5952 |
Framework versions
- Transformers 4.39.2
- Pytorch 2.2.1+cu121
- Datasets 2.18.0
- Tokenizers 0.15.2
- Downloads last month
- 5