license: other
tags:
- 模型融合
- mergekit工具
- lazymergekit工具
base_model:
- meta-llama/Meta-Llama-3-70B-Instruct(重复7次)

Meta-Llama-3-120B指令模型
Meta-Llama-3-120B-Instruct是通过MergeKit工具对meta-llama/Meta-Llama-3-70B-Instruct进行自融合创建的。
其灵感来源于以下大型融合模型:
特别感谢Eric Hartford对本模型的启发与评估,以及Charles Goddard开发MergeKit工具。
🔍 应用场景
推荐将此模型用于创意写作。该模型采用Llama 3对话模板,默认支持8K上下文窗口(可通过rope theta参数扩展)。
评估章节中的示例可直观展示其性能。该模型通常具有天马行空的想象力且文风上乘,偶尔会出现拼写错误,并有偏好大写字母的特点。
⚡ 量化版本
感谢Bartowski、elinas及mlx社区提供的量化模型:
- 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创意写作测评:https://twitter.com/erhartford/status/1787050962114207886
- Daniel Kaiser创意写作测评:https://twitter.com/spectate_or/status/1787257261309518101
- Simon逻辑推理测评:https://twitter.com/NewDigitalEdu/status/1787403266894020893
- Reddit社区讨论: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": "什么是大语言模型?"}]
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"])