HuggingFace镜像/germeo-7b-laser
模型介绍文件和版本分析
下载使用量0

(评估进行中)

Hermes + Leo + German Laser = Germeo

Germeo-7B-Laser

一个基于 Hermeo-7B 合并而来的德英双语理解、但仅使用德语输出的模型。

模型详情

合并来源:leo-mistral-hessianai-7b-chat 和 DPOpenHermes-7B-v2

模型类型:因果解码器式 openmind 语言模型

语言:德语回复,具备英语理解能力

Laser-Data:LeoLM/OpenSchnabeltier

这是一项关于 laser 及其对语言理解影响的早期实验。它通常能提升语言理解能力。 假设是,它会降低英语回复的概率,同时增加德语回复的概率。模型内部的德语能力得到增强。

将持续更新……

提示词格式:

streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
# Convert prompt to tokens
prompt_template = """<|im_start|>system
Du bist ein hilfreicher Assistent.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant"""

prompt = "Schreibe eine Stellenanzeige für Data Scientist bei AXA!"

final_prompt = prompt_template.format(prompt=prompt)

代码使用:

以下是构建此模型的核心部分:

import argparse
import torch
from openmind import pipeline, is_torch_npu_available, AutoModelForCausalLM, AutoTokenizer

# Check if NPU or CPU is available
if is_torch_npu_available():
  device = "npu:0"
  print("Using NPU for inference")
else:
  device = "cpu"
  print("Using CPU for inference")

# Load the model and tokenizer
model = AutoModelForCausalLM.from_pretrained("SY_AICC/germeo-7b-laser", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

# Define the pipeline with the correct task
generate_text = pipeline(
  task="text-generation",  # Specify the task
  model=model,
  tokenizer=tokenizer,
  torch_dtype=torch.bfloat16 if device != "cpu" else torch.float32,  # Use bfloat16 if not on CPU
  device=device
)

德语基准测试

德语任务:MMLU-DEHellaswag-DEARC-DE平均值
模型 / 少样本:(5 样本)(10 样本)(24 样本)
70亿参数
llama-2-7b0.4000.5130.3810.431
leo-hessianai-7b0.4000.6090.4290.479
bloom-6b4-clp-german0.2740.5500.3510.392
mistral-7b0.5240.5880.4730.528
leo-mistral-hessianai-7b0.4810.6630.4850.543
leo-mistral-hessianai-7b-chat0.4580.6170.4650.513
DPOpenHermes-7B-v20.5170.6030.5150.545
hermeo-7b0.5110.6680.5280.569
germeo-7b-laser (本模型)????
130亿参数
llama-2-13b0.4690.5810.4680.506
leo-hessianai-13b0.4860.6580.5090.551
700亿参数
llama-2-70b0.5970.6740.5610.611
leo-hessianai-70b0.6530.7210.6000.658

尽管该模型在未被明确要求的情况下不会生成英文文本,但其在英文基准测试中的性能仍然有所提升:

英语基准测试

英语任务:MMLUHellaswagARC平均值
模型 / 少样本:(5 样本)(10 样本)(24 样本)
llama-2-7b0.4660.7860.5300.594
leolm-hessianai-7b0.4230.7590.5220.568
bloom-6b4-clp-german0.2640.5250.3280.372
mistral-7b0.6350.8320.6070.691
leolm-mistral-hessianai-7b0.5500.7770.5180.615
hermeo-7b0.6010.8210.6200.681
germeo-7b-laser (本模型)0.6010.8280.6080.679

Open LLM 排行榜评估结果

详细结果可查看此处

指标数值
平均值62.82
AI2 推理挑战(25次提示)60.75
HellaSwag(10次提示)82.81
MMLU(5次提示)60.57
TruthfulQA(零次提示)53.83
Winogrande(5次提示)75.61
GSM8k(5次提示)43.37