CoolFace
Modelpublic

RichardErkhov/mlabonne_-_NeuralHermes-2.5-Mistral-7B-laser-gguf

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes4.9kdownloads
Model Card

Quantization made by Richard Erkhov.

Github

Discord

Request more models

NeuralHermes-2.5-Mistral-7B-laser - GGUF

  • —Model creator: https://huggingface.co/mlabonne/
  • —Original model: https://huggingface.co/mlabonne/NeuralHermes-2.5-Mistral-7B-laser/

Original model description: --- language:

  • —en license: apache-2.0 tags:
  • —mistral
  • —instruct
  • —finetune
  • —chatml
  • —gpt4
  • —synthetic data
  • —distillation
  • —dpo
  • —rlhf
  • —laser datasets:
  • —mlabonne/chatmldpopairs base_model: teknium/OpenHermes-2.5-Mistral-7B model-index:
  • —name: NeuralHermes-2.5-Mistral-7B-laser results:
  • —task: type: text-generation name: Text Generation dataset: name: AI2 Reasoning Challenge (25-Shot) type: ai2arc config: ARC-Challenge split: test args: numfew_shot: 25 metrics:
  • —type: accnorm value: 66.38 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/openllm_leaderboard?query=mlabonne/NeuralHermes-2.5-Mistral-7B-laser name: Open LLM Leaderboard
  • —task: type: text-generation name: Text Generation dataset: name: HellaSwag (10-Shot) type: hellaswag split: validation args: numfewshot: 10 metrics:
  • —type: accnorm value: 85.09 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/openllm_leaderboard?query=mlabonne/NeuralHermes-2.5-Mistral-7B-laser name: Open LLM Leaderboard
  • —task: type: text-generation name: Text Generation dataset: name: MMLU (5-Shot) type: cais/mmlu config: all split: test args: numfewshot: 5 metrics:
  • —type: acc value: 63.43 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/openllmleaderboard?query=mlabonne/NeuralHermes-2.5-Mistral-7B-laser name: Open LLM Leaderboard
  • —task: type: text-generation name: Text Generation dataset: name: TruthfulQA (0-shot) type: truthfulqa config: multiplechoice split: validation args: numfewshot: 0 metrics:
  • —type: mc2 value: 54.95 source: url: https://huggingface.co/spaces/HuggingFaceH4/openllmleaderboard?query=mlabonne/NeuralHermes-2.5-Mistral-7B-laser name: Open LLM Leaderboard
  • —task: type: text-generation name: Text Generation dataset: name: Winogrande (5-shot) type: winogrande config: winograndexl split: validation args: numfew_shot: 5 metrics:
  • —type: acc value: 78.14 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/openllmleaderboard?query=mlabonne/NeuralHermes-2.5-Mistral-7B-laser name: Open LLM Leaderboard
  • —task: type: text-generation name: Text Generation dataset: name: GSM8k (5-shot) type: gsm8k config: main split: test args: numfewshot: 5 metrics:
  • —type: acc value: 55.72 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/openllmleaderboard?query=mlabonne/NeuralHermes-2.5-Mistral-7B-laser name: Open LLM Leaderboard ---

<center><img src="https://i.imgur.com/gUlEJuU.jpeg"></center>

NeuralHermes 2.5 - Mistral 7B - LASER

This is an experimental LASER version of NeuralHermes using laserRMT, based on this paper.

ModelAGIEvalGPT4AllTruthfulQABigbenchAverage
NeuralHermes-2.5-Mistral-7B-laser43.5473.4455.2642.2453.62
NeuralHermes-2.5-Mistral-7B43.6773.2455.3741.7653.51

Fernando Fernandes Neto and Eric Hartford. "Optimizing Large Language Models Using Layer-Selective Rank Reduction and Random Matrix Theory." 2024.

NeuralHermes is an teknium/OpenHermes-2.5-Mistral-7B model that has been further fine-tuned with Direct Preference Optimization (DPO) using the mlabonne/chatml_dpo_pairs dataset. It surpasses the original model on several benchmarks (see results).

It is directly inspired by the RLHF process described by Intel/neural-chat-7b-v3-1's authors to improve performance. I used the same dataset and reformatted it to apply the ChatML template.

The code to train this model is available on Google Colab and GitHub. It required an A100 GPU for about an hour.

Results

AGIEval

TaskVersionMetricValueStderr
agievalaquarat0acc21.26±2.57
acc_norm22.83±2.64
agievallogiqaen0acc39.32±1.92
acc_norm40.71±1.93
agievallsatar0acc25.65±2.89
acc_norm25.65±2.89
agievallsatlr0acc48.82±2.22
acc_norm50.00±2.22
agievallsatrc0acc58.36±3.01
acc_norm57.25±3.02
agievalsaten0acc74.27±3.05
acc_norm73.30±3.09
agievalsatenwithoutpassage0acc43.69±3.46
acc_norm42.23±3.45
agievalsatmath0acc37.27±3.27
acc_norm36.36±3.25

Average: 43.54%

GPT4All

TaskVersionMetricValueStderr
arc_challenge0acc57.76±1.44
acc_norm60.32±1.43
arc_easy0acc83.84±0.76
acc_norm81.10±0.80
boolq1acc86.70±0.59
hellaswag0acc63.15±0.48
acc_norm82.55±0.38
openbookqa0acc34.40±2.13
acc_norm45.20±2.23
piqa0acc81.94±0.90
acc_norm82.97±0.88
winogrande0acc75.22±1.21

Average: 73.44%

TruthfulQA

TaskVersionMetricValueStderr
truthfulqa_mc1mc137.70±1.70
mc255.26±1.52

Average: 55.26%

Bigbench

TaskVersionMetricValueStderr
bigbenchcausaljudgement0multiplechoicegrade53.16±3.63
bigbenchdateunderstanding0multiplechoicegrade65.31±2.48
bigbenchdisambiguationqa0multiplechoicegrade34.11±2.96
bigbenchgeometricshapes0multiplechoicegrade27.02±2.35
exactstrmatch0.28±0.28
bigbenchlogicaldeductionfiveobjects0multiplechoicegrade27.80±2.01
bigbenchlogicaldeductionsevenobjects0multiplechoicegrade19.86±1.51
bigbenchlogicaldeductionthreeobjects0multiplechoicegrade48.33±2.89
bigbenchmovierecommendation0multiplechoicegrade41.40±2.20
bigbench_navigate0multiplechoicegrade50.00±1.58
bigbenchreasoningaboutcoloredobjects0multiplechoicegrade65.00±1.07
bigbenchruinnames0multiplechoicegrade46.21±2.36
bigbenchsalienttranslationerrordetection0multiplechoicegrade27.25±1.41
bigbench_snarks0multiplechoicegrade70.72±3.39
bigbenchsportsunderstanding0multiplechoicegrade65.72±1.51
bigbenchtemporalsequences0multiplechoicegrade30.40±1.46
bigbenchtrackingshuffledobjectsfive_objects0multiplechoicegrade22.56±1.18
bigbenchtrackingshuffledobjectsseven_objects0multiplechoicegrade17.09±0.90
bigbenchtrackingshuffledobjectsthree_objects0multiplechoicegrade48.33±2.89

Average: 42.24%

Average score: 53.62%

Usage

You can run this model using LM Studio or any other frontend.

You can also run this model using the following code:

python
import transformers
from transformers import AutoTokenizer

# Format prompt
message = [
    {"role": "system", "content": "You are a helpful assistant chatbot."},
    {"role": "user", "content": "What is a Large Language Model?"}
]
tokenizer = AutoTokenizer.from_pretrained(new_model)
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False)

# Create pipeline
pipeline = transformers.pipeline(
    "text-generation",
    model="mlabonne/NeuralHermes-2.5-Mistral-7B-laser",
    tokenizer=tokenizer
)

# Generate text
sequences = pipeline(
    prompt,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    num_return_sequences=1,
    max_length=200,
)
print(sequences[0]['generated_text'])

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.67.29
AI2 Reasoning Challenge (25-Shot)66.38
HellaSwag (10-Shot)85.09
MMLU (5-Shot)63.43
TruthfulQA (0-shot)54.95
Winogrande (5-shot)78.14
GSM8k (5-shot)55.72