🚀 Meta-Llama-3-120B-Instruct
Meta-Llama-3-120B-Instructは、MergeKitを使って作成されたmeta-llama/Meta-Llama-3-70B-Instructの自己マージモデルです。
このモデルは、以下のような大規模マージモデルにインスピレーションを得ています。
このモデルのアイデア提供と評価を行ってくれたEric Hartford氏、およびMergeKitを作成したCharles Goddard氏に特別な感謝を申し上げます。

🚀 クイックスタート
Meta-Llama-3-120B-Instructは、特定の用途に最適化されたモデルです。以下にその概要と使用方法を説明します。
✨ 主な機能
🔍 アプリケーション
このモデルは創作的な文章作成に最適です。Llama 3チャットテンプレートを使用し、デフォルトのコンテキストウィンドウは8Kです(rope thetaを使って拡張可能)。
評価セクションの例を見ると、その性能を把握することができます。このモデルは一般的には非常に自由奔放ですが、良い文章スタイルを持っています。時々タイポが出ることがあり、大文字を多用する傾向があります。
⚡ 量子化モデル
Bartowski氏、elinas氏、mlx-communityなどの方々によって提供された量子化モデルがあります。
- GGUF: https://huggingface.co/lmstudio-community/Meta-Llama-3-120B-Instruct-GGUF
- EXL2: https://huggingface.co/elinas/Meta-Llama-3-120B-Instruct-4.0bpw-exl2
- mlx: https://huggingface.co/mlx-community/Meta-Llama-3-120B-Instruct-4bit
🏆 評価
このモデルは創作的な文章作成には優れていますが、他のタスクでは苦労することがあります。注意して使用し、特定の用途以外でGPT - 4を上回ることは期待しないでください。
- Eric Hartford氏によるXスレッド(創作的な文章作成): https://twitter.com/erhartford/status/1787050962114207886
- Daniel Kaiser氏によるXスレッド(創作的な文章作成): https://twitter.com/spectate_or/status/1787257261309518101
- Simon氏によるXスレッド(推論): https://twitter.com/NewDigitalEdu/status/1787403266894020893
- r/LocalLLaMa: https://www.reddit.com/r/LocalLLaMA/comments/1cl525q/goliath_lovers_where_is_the_feedback_about/
創作的な文章作成
このモデルを評価し、結果を送ってくれたSam Paech氏に感謝します!

📚 ドキュメント
🧩 設定
slices:
- sources:
- layer_range: [0, 20]
model: meta-llama/Meta-Llama-3-70B-Instruct
- sources:
- layer_range: [10, 30]
model: meta-llama/Meta-Llama-3-70B-Instruct
- sources:
- layer_range: [20, 40]
model: meta-llama/Meta-Llama-3-70B-Instruct
- sources:
- layer_range: [30, 50]
model: meta-llama/Meta-Llama-3-70B-Instruct
- sources:
- layer_range: [40, 60]
model: meta-llama/Meta-Llama-3-70B-Instruct
- sources:
- layer_range: [50, 70]
model: meta-llama/Meta-Llama-3-70B-Instruct
- sources:
- layer_range: [60, 80]
model: meta-llama/Meta-Llama-3-70B-Instruct
merge_method: passthrough
dtype: float16
💻 使用例
基本的な使用法
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "mlabonne/Meta-Llama-3-120B-Instruct"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
📄 ライセンス
ライセンスはotherです。