Downloads · 30 days
97
8% of all-time downloads
RichardErkhov/alfredplpl_-_Llama-3-8B-Instruct-Ja-gguf
alfredplpl_-_Llama-3-8B-Instruct-Ja-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
97
8% of all-time downloads
All-time downloads
1.2K
Public
Repo size
92.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf108 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Llama-3-8B-Instruct-Ja - GGUF
| Name | Quant method | Size |
|---|---|---|
| Llama-3-8B-Instruct-Ja.Q2_K.gguf | Q2_K | 2.96GB |
| Llama-3-8B-Instruct-Ja.IQ3_XS.gguf | IQ3_XS | 3.28GB |
| Llama-3-8B-Instruct-Ja.IQ3_S.gguf | IQ3_S | 3.43GB |
| Llama-3-8B-Instruct-Ja.Q3_K_S.gguf | Q3_K_S | 3.41GB |
| Llama-3-8B-Instruct-Ja.IQ3_M.gguf | IQ3_M | 3.52GB |
| Llama-3-8B-Instruct-Ja.Q3_K.gguf | Q3_K | 3.74GB |
| Llama-3-8B-Instruct-Ja.Q3_K_M.gguf | Q3_K_M | 3.74GB |
| Llama-3-8B-Instruct-Ja.Q3_K_L.gguf | Q3_K_L | 4.03GB |
| Llama-3-8B-Instruct-Ja.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| Llama-3-8B-Instruct-Ja.Q4_0.gguf | Q4_0 | 4.34GB |
| Llama-3-8B-Instruct-Ja.IQ4_NL.gguf | IQ4_NL | 4.38GB |
| Llama-3-8B-Instruct-Ja.Q4_K_S.gguf | Q4_K_S | 4.37GB |
| Llama-3-8B-Instruct-Ja.Q4_K.gguf | Q4_K | 4.58GB |
| Llama-3-8B-Instruct-Ja.Q4_K_M.gguf | Q4_K_M | 4.58GB |
| Llama-3-8B-Instruct-Ja.Q4_1.gguf | Q4_1 | 4.78GB |
| Llama-3-8B-Instruct-Ja.Q5_0.gguf | Q5_0 | 5.21GB |
| Llama-3-8B-Instruct-Ja.Q5_K_S.gguf | Q5_K_S | 5.21GB |
| Llama-3-8B-Instruct-Ja.Q5_K.gguf | Q5_K | 5.34GB |
| Llama-3-8B-Instruct-Ja.Q5_K_M.gguf | Q5_K_M | 5.34GB |
| Llama-3-8B-Instruct-Ja.Q5_1.gguf | Q5_1 | 5.65GB |
| Llama-3-8B-Instruct-Ja.Q6_K.gguf | Q6_K | 6.14GB |
| Llama-3-8B-Instruct-Ja.Q8_0.gguf | Q8_0 | 7.95GB |
language:

このリポジトリはLlama 3を日本語化しようとしたモデルのリポジトリです。4/23に更新したため、新しくダウンロードすることをオススメします。
Llama 3 ライセンスなので商用利用可能です。ただし、Llama 3ライセンスをよく読んで使ってください。
手っ取り早くやるならデモを使ってください。次点はColabがおすすめです。 ローカルでやる場合は次のとおりです。
まず、ライブラリを次のようにインストールします。
pip install -U transformers accelerate
その後、以下のコードを実行してください。
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("alfredplpl/Llama-3-8B-Instruct-Ja")
model = AutoModelForCausalLM.from_pretrained("alfredplpl/Llama-3-8B-Instruct-Ja", device_map="auto", torch_dtype=torch.bfloat16)
# プロンプトの準備
messages = [
{
'role': "system",
'content': "あなたは日本語で回答するAIアシスタントです。"
},
{
'role': "user",
'content': "猫と犬、どっちが好き?"
}
]
prompt=tokenizer.apply_chat_template(messages, tokenize=False)
# 推論の実行
input_ids = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**input_ids,
max_new_tokens=128,
do_sample=True,
top_p=0.95,
temperature=0.2,
repetition_penalty=1.1,
eos_token_id=[
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("<|eot_id|>")
],
)
print(tokenizer.decode(outputs[0]))
次のような結果が得られるはずです。
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
あなたは日本語で回答するAIアシスタントです。<|eot_id|><|start_header_id|>user<|end_header_id|>
猫と犬、どっちが好き?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
猫と犬の両方を飼っているので、どちらも好きだ!<|eot_id|>
meta-llama/Meta-Llama-3-8B-Instructに対して、cl-nagoya/auto-wiki-qaにある約240万件の学習データでLoRAによるインストラクションチューニングを1epoch行い、LoRAをマージしました。 その後、そのモデルに対して、llm-jp/databricks-dolly-15k-jaでLoRAによるインストラクションチューニングを5epoch行い、LoRAをマージしました。 これらの学習はすべて教師あり学習で行いました。