hf_mirrors/germeo-7b-laser
Model Introduction
Files & versions
Analysis

(Evaluation WIP)

Hermes + Leo + German Laser = Germeo

Germeo-7B-Laser

A German-English understanding, but German-only speaking model merged from Hermeo-7B.

Model details

Merged from: leo-mistral-hessianai-7b-chat and DPOpenHermes-7B-v2

Model type: Causal decoder-only openmind language model

Languages: German replies with English Understanding Capabilities

Laser-Data: LeoLM/OpenSchnabeltier

This is an early experiment on laser and its influence on language understanding. It generally improves the language understanding capabilities. The hypothesis is that it degrades the probability of English replies and increasing those of German replies. The models internal German capabilities are boosted.

Will keep you updated..

Prompt format:

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)

Code Usage:

Below is the core part of building this model:

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
)

German benchmarks

German tasks:MMLU-DEHellaswag-DEARC-DEAverage
Models / Few-shots:(5 shots)(10 shots)(24 shots)
7B parameters
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 (this model)????
13B parameters
llama-2-13b0.4690.5810.4680.506
leo-hessianai-13b0.4860.6580.5090.551
70B parameters
llama-2-70b0.5970.6740.5610.611
leo-hessianai-70b0.6530.7210.6000.658

Even though the model does not generate English text without being explicitly asked, performance on English Benchmarks is still up:

English benchmarks

English tasks:MMLUHellaswagARCAverage
Models / Few-shots:(5 shots)(10 shots)(24 shots)
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 (this model)0.6010.8280.6080.679

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.62.82
AI2 Reasoning Challenge (25-Shot)60.75
HellaSwag (10-Shot)82.81
MMLU (5-Shot)60.57
TruthfulQA (0-shot)53.83
Winogrande (5-shot)75.61
GSM8k (5-shot)43.37