Text Generation
Transformers
Safetensors
English
Japanese
llama
mergekit
Merge
conversational
text-generation-inference
Instructions to use agentlans/Llama3-ja with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use agentlans/Llama3-ja with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="agentlans/Llama3-ja") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("agentlans/Llama3-ja") model = AutoModelForCausalLM.from_pretrained("agentlans/Llama3-ja", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use agentlans/Llama3-ja with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "agentlans/Llama3-ja" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "agentlans/Llama3-ja", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/agentlans/Llama3-ja
- SGLang
How to use agentlans/Llama3-ja 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 "agentlans/Llama3-ja" \ --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": "agentlans/Llama3-ja", "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 "agentlans/Llama3-ja" \ --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": "agentlans/Llama3-ja", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use agentlans/Llama3-ja with Docker Model Runner:
docker model run hf.co/agentlans/Llama3-ja
Update README.md
Browse files20 unmodified lines2122232425262732 unmodified lines6061626320 unmodified lines---# Llama3-ja## Model DetailsThis model is a linear merge of multiple Llama 3 8B models fine-tuned for Japanese language tasks, created using [mergekit](https://github.com/cg123/mergekit).The aim is to create a more robust and versatile Japanese language model that leverages the strengths of each individual model.32 unmodified lines## AcknowledgementsThank you to the creators and contributors of all the component models for their valuable work in advancing Japanese language AI capabilities.20 unmodified lines2122232425262728293032 unmodified lines6364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111220 unmodified lines---# Llama3-ja<details><summary>English</summary>## Model DetailsThis model is a linear merge of multiple Llama 3 8B models fine-tuned for Japanese language tasks, created using [mergekit](https://github.com/cg123/mergekit).The aim is to create a more robust and versatile Japanese language model that leverages the strengths of each individual model.32 unmodified lines## AcknowledgementsThank you to the creators and contributors of all the component models for their valuable work in advancing Japanese language AI capabilities.</details><details><summary>Japanese</summary>## モデル詳細このモデルは、複数のLlama 3 8Bモデルの線形マージで、日本語タスクにファインチューニングされたものです。[mergekit](https://github.com/cg123/mergekit)を使用して作成されました。各個別モデルの強みを活用し、より堅牢かつ多様な日本語言学モデルを作成することを目指しています。## 目的利用このモデルは、以下のような日本語自然言語処理タスク向けに設計されていますが、これらに限定されません:- テキスト生成- 会話やチャットボットアプリケーション- テキスト補完- 質問応答- 要約## 制限事項このモデルは、複数の日本語フォーカスしたLlama 3モデルの組み合わせですが、それでも制限があります:- 特定のタスクでのパフォーマンスが異なる場合がある- モデルは構成要素から偏見を受け継ぐ可能性あり## 含まれるモデルこれらのモデルを組み合わせることで、各個別モデルの強みを活用し、より堅牢かつ多様な日本語言学モデルを作成します。- [elyza/Llama-3-ELYZA-JP-8B](https://huggingface.co/elyza/Llama-3-ELYZA-JP-8B)- [rinna/llama-3-youko-8b-instruct](https://huggingface.co/rinna/llama-3-youko-8b-instruct)- [lightblue/suzume-llama-3-8B-japanese](https://huggingface.co/lightblue/suzume-llama-3-8B-japanese)- [neoai-inc/Llama-3-neoAI-8B-Chat-v0.1](https://huggingface.co/neoai-inc/Llama-3-neoAI-8B-Chat-v0.1)- [AXCXEPT/Llama-3-EZO-8b-Common-it](https://huggingface.co/AXCXEPT/Llama-3-EZO-8b-Common-it)- [tokyotech-llm/Llama-3-Swallow-8B-Instruct-v0.1](https://huggingface.co/tokyotech-llm/Llama-3-Swallow-8B-Instruct-v0.1)- [alfredplpl/Llama-3-8B-Instruct-Ja](https://huggingface.co/alfredplpl/Llama-3-8B-Instruct-Ja)- [haqishen/Llama-3-8B-Japanese-Instruct](https://huggingface.co/haqishen/Llama-3-8B-Japanese-Instruct)- [owner203/japanese-llama-3-8b-instruct-v2](https://huggingface.co/owner203/japanese-llama-3-8b-instruct-v2)- [shisa-ai/shisa-v1-llama3-8b](https://huggingface.co/shisa-ai/shisa-v1-llama3-8b)## 謝辞すべてのコンポーネントモデルの創作者と貢献者に感謝いたします。彼らの価値ある仕事により、日本語AI能力が進歩しました。</details>
README.md+51-2