Edit model card

[Llama-3-EZO model card]

image/png

Based on meta-llama/Meta-Llama-3-8B-Instruct, it has been enhanced for Japanese usage through additional pre-training and instruction tuning. (Built with Meta Llama3)

This model is based on Llama-3-8B-Instruct and is subject to the Llama-3 Terms of Use. For detailed information, please refer to the official Llama-3 license page.

このモデルはLlama-3-8B-Instructをベースにしており、Llama-3の利用規約に従います。詳細については、Llama-3の公式ライセンスページをご参照ください。

[Model Information]

This model is based on Llama-3-8B-Instruct, enhanced with multiple tuning techniques to improve its general performance. While it excels in Japanese language tasks, it's designed to meet diverse needs globally.

Llama-3-8B-Instructをベースとして、複数のチューニング手法を採用のうえ、汎用的に性能を向上させたモデルです。日本語タスクに優れつつ、世界中の多様なニーズに応える設計となっています。

[Benchmark Results]

image/png

[Usage]

Here are some code snippets to quickly get started with the model. First, run: pip install -U transformers Then, copy the snippet from the relevant section for your use case.

以下に、モデルの実行を素早く開始するためのコードスニペットをいくつか紹介します。 まず、 pip install -U transformers を実行し、使用例に関連するセクションのスニペットをコピーしてください。

[Chat Template]

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

DEFAULT_SYSTEM_PROMPT = "あなたは誠実で優秀な日本人のアシスタントです。指示がなければ、原則日本語で回答してください。"
text = "次の物語の展開を予想してみましょう。ある日、主人公のもとに不思議な手紙が届きました。手紙には「今夜の満月に、森の奥深くにある洞窟に来てください。あなたを待っています。」と書かれていました。主人公はその手紙に従い、夜中に洞窟の入り口にたどり着きました。中に入ると、謎めいた人物と出会い。"

model_name = "HODACHI/Llama-3-EZO-8b-Common-it"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
)
model.eval()

messages = [
    {"role": "system", "content": DEFAULT_SYSTEM_PROMPT},
    {"role": "user", "content": text},
]
prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
token_ids = tokenizer.encode(
    prompt, add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    output_ids = model.generate(
        token_ids.to(model.device),
        max_new_tokens=1024,
        do_sample=True,
        temperature=0.6,
        top_p=0.9,
    )
output = tokenizer.decode(
    output_ids.tolist()[0][token_ids.size(1):], skip_special_tokens=True
)
print(output)

[Model Data]

Training Dataset]

We extracted high-quality data from Japanese Wikipedia and FineWeb to create instruction data. Our innovative training approach allows for performance improvements across various languages and domains, making the model suitable for global use despite its focus on Japanese data.

日本語のWikiデータおよび、FineWebから良質なデータのみを抽出し、Instructionデータを作成しました。このモデルでは日本語に特化させていますが、世界中のどんなユースケースでも利用可能なアプローチです。

https://huggingface.co/datasets/legacy-datasets/wikipedia https://huggingface.co/datasets/HuggingFaceFW/fineweb

Data Preprocessing

We used a plain instruction tuning method to train the model on exemplary responses. This approach enhances the model's ability to understand and generate high-quality responses across various languages and contexts.

プレインストラクトチューニング手法を用いて、模範的回答を学習させました。この手法により、モデルは様々な言語やコンテキストにおいて高品質な応答を理解し生成する能力が向上しています。

Implementation Information

[Pre-Instruction Training]

https://huggingface.co/instruction-pretrain/instruction-synthesizer

[Disclaimer]

このモデルは研究開発のみを目的として提供されるものであり、実験的なプロトタイプとみなされるべきモデルです。 商業的な使用やミッションクリティカルな環境への配備を意図したものではありません。 本モデルの使用は、使用者の責任において行われるものとし、その性能および結果は保証されません。 Axcxept株式会社は、直接的、間接的、特別、偶発的、結果的な損害、または本モデルの使用から生じるいかなる損失に対しても、得られた結果にかかわらず、一切の責任を負いません。 利用者は、本モデルの使用に伴うリスクを十分に理解し、自己の判断で使用するものとします。

[Hardware]

A100 × 4(Running in 12h)

[謝辞]

本ベースモデルを開発してくださったMeta社ならびに当該チームの開発者の方々、また自動評価の手法を提供してくださった多数の方々に感謝と尊敬の意を表します。

[We are.]

Axcxept logo

Downloads last month
1,898
Safetensors
Model size
8.03B params
Tensor type
BF16
·
Inference API
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Spaces using AXCXEPT/Llama-3-EZO-8b-Common-it 2

Collection including AXCXEPT/Llama-3-EZO-8b-Common-it