Text Generation
Transformers
PyTorch
Japanese
English
llama
llama-2
japanese
lm
nlp
conversational
text-generation-inference
Instructions to use if001/llama2_ja_small_instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use if001/llama2_ja_small_instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="if001/llama2_ja_small_instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("if001/llama2_ja_small_instruct") model = AutoModelForCausalLM.from_pretrained("if001/llama2_ja_small_instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use if001/llama2_ja_small_instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "if001/llama2_ja_small_instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "if001/llama2_ja_small_instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/if001/llama2_ja_small_instruct
- SGLang
How to use if001/llama2_ja_small_instruct 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 "if001/llama2_ja_small_instruct" \ --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": "if001/llama2_ja_small_instruct", "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 "if001/llama2_ja_small_instruct" \ --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": "if001/llama2_ja_small_instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use if001/llama2_ja_small_instruct with Docker Model Runner:
docker model run hf.co/if001/llama2_ja_small_instruct
fix
Browse files
README.md
CHANGED
|
@@ -5,8 +5,17 @@ language:
|
|
| 5 |
- en
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
inference: false
|
|
|
|
|
|
|
|
|
|
| 8 |
tags:
|
| 9 |
- llama-2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
日本語でtrainingしたllama2をinstruction用のデータセットでsftしたものになります
|
|
|
|
| 5 |
- en
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
inference: false
|
| 8 |
+
datasets:
|
| 9 |
+
- kunishou/databricks-dolly-15k-ja
|
| 10 |
+
- kunishou/oasst1-89k-ja
|
| 11 |
tags:
|
| 12 |
- llama-2
|
| 13 |
+
- ja
|
| 14 |
+
- japanese
|
| 15 |
+
- text-generation
|
| 16 |
+
- lm
|
| 17 |
+
- nlp
|
| 18 |
+
- conversational
|
| 19 |
---
|
| 20 |
|
| 21 |
日本語でtrainingしたllama2をinstruction用のデータセットでsftしたものになります
|