CoolFace
Modelpublic

yuvraj17/Llama3-8B-SuperNova-Spectrum-dare_ties

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes27downloads
Model Card

Llama3-8B-SuperNova-Spectrum-dare_ties

Llama3-8B-SuperNova-Spectrum-dareties is a `dareties` merge of the following models using LazyMergekit:

DARE_TIES Merging

TIES Merging

TIES Merging, introduced by Yadav et al. (2023), is a method for merging multiple specialized models into one general-purpose model. It solves two key challenges:

  • —Redundancy Removal: Identifies and eliminates overlapping or unnecessary information between models, making the final model more efficient.
  • —Conflict Resolution: Reconciles differences between models by creating a unified sign vector that represents the most dominant direction of change across all models.

TIES stands for TRIM, ELECT SIGN & MERGE (TIES-MERGING).

<figure>

<img src="https://cdn-uploads.huggingface.co/production/uploads/66137d95e8d2cda230ddcea6/2vBgcGko-tcsaAkLUzHnU.png" width="1000" height="768"> <figcaption> How TIES-Merging Works <a href="//arxiv.org/pdf/2306.01708">Reference</a> </figcaption>

</figure>

DARE Merging

Introduced by Yu et al. (2023), DARE uses an approach similar to TIES with two main differences:

  • —Weight Pruning: Randomly resets some fine-tuned weights to their original values, reducing model complexity.
  • —Weight Scaling: Adjusts the remaining weights by scaling and combining them with the base model's weights to maintain consistent performance.

DARE stands for DROP AND RESCALE

Mergekit’s implementation of DARE-Merging has two flavours: with the sign election step of TIES (dare_ties) or without (dare_linear). I have chosen dare_ties for this merge.

For more information refer this Merge Large Language Models with MergeKit by Maxime Labonne

Also, if you want to get in-depth knowledge about Model-Merging and its different types, I highly recommend this YouTube Video by Julien Simon

🧩 Configuration

yaml
models:
  - model: NousResearch/Meta-Llama-3-8B
    # No parameters necessary for base model
  - model: yuvraj17/Llama-3-8B-spectrum-25
    parameters:
      density: 0.56
      weight: 0.12
  - model: ruggsea/Llama3-stanford-encyclopedia-philosophy-QA
    parameters:
      density: 0.56
      weight: 0.12
  - model: arcee-ai/Llama-3.1-SuperNova-Lite
    parameters:
      density: 0.58
      weight: 0.55
merge_method: dare_ties
base_model: NousResearch/Meta-Llama-3-8B
dtype: bfloat16

💻 Usage

python
!pip install -qU transformers accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "yuvraj17/Llama3-8B-SuperNova-Spectrum-dare_ties"
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"])
A large language model is a type of artificial intelligence (AI) model designed to understand and generate human language. It is trained on a massive corpus of text data, which it uses to learn patterns and relationships between words and concepts. Large language models are typically based on a deep learning approach called transformer architecture, which was introduced by the Google research paper "Attention Is All You Need" (2017). These models are designed to handle the complexity of natural language by capturing long-range dependencies and contextual relationships between words. Large language models can perform a variety of tasks, including: - Natural language processing (NLP): large language models can understand and generate text, and can be used for tasks such as text classification, sentiment analysis, and named entity recognition. - Text generation: large language models can generate human-like text, such as chatbots, language translation, and text summarization. - Question answering: large language models can answer questions based on the text they have been trained on. - Conversational AI: large language models can be used to create conversational agents that can understand and respond to user input.

🏆 Evaluation Scores

Nous

ModelAGIEvalTruthfulQABigbench
Llama3-8B-SuperNova-Spectrum-dare_ties38.3257.1543.91

AGIEval

TaskVersionMetricValueStderr
agievalaquarat0acc20.47±2.54
acc_norm18.50±2.44
agievallogiqaen0acc35.94±1.88
acc_norm35.64±1.88
agievallsatar0acc21.74±2.73
acc_norm20.00±2.64
agievallsatlr0acc41.37±2.18
acc_norm40.98±2.18
agievallsatrc0acc59.11±3.00
acc_norm56.13±3.03
agievalsaten0acc63.59±3.36
acc_norm60.19±3.42
agievalsatenwithoutpassage0acc40.29±3.43
acc_norm37.38±3.38
agievalsatmath0acc38.64±3.29
acc_norm37.73±3.28

Average: 38.32%

TruthfulQA

TaskVersionMetricValueStderr
truthfulqa_mc1mc138.43±1.7
mc257.15±1.5

Average: 57.15%

Bigbench

TaskVersionMetricValueStderr
bigbenchcausaljudgement0multiplechoicegrade58.42±3.59
bigbenchdateunderstanding0multiplechoicegrade70.73±2.37
bigbenchdisambiguationqa0multiplechoicegrade30.23±2.86
bigbenchgeometricshapes0multiplechoicegrade47.35±2.64
exactstrmatch0.00±0.00
bigbenchlogicaldeductionfiveobjects0multiplechoicegrade29.00±2.03
bigbenchlogicaldeductionsevenobjects0multiplechoicegrade21.00±1.54
bigbenchlogicaldeductionthreeobjects0multiplechoicegrade51.33±2.89
bigbenchmovierecommendation0multiplechoicegrade33.20±2.11
bigbench_navigate0multiplechoicegrade55.40±1.57
bigbenchreasoningaboutcoloredobjects0multiplechoicegrade66.35±1.06
bigbenchruinnames0multiplechoicegrade45.76±2.36
bigbenchsalienttranslationerrordetection0multiplechoicegrade28.26±1.43
bigbench_snarks0multiplechoicegrade62.43±3.61
bigbenchsportsunderstanding0multiplechoicegrade50.30±1.59
bigbenchtemporalsequences0multiplechoicegrade48.00±1.58
bigbenchtrackingshuffledobjectsfive_objects0multiplechoicegrade23.60±1.20
bigbenchtrackingshuffledobjectsseven_objects0multiplechoicegrade17.66±0.91
bigbenchtrackingshuffledobjectsthree_objects0multiplechoicegrade51.33±2.89

Average: 43.91%

Special thanks & Reference

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.19.00
IFEval (0-Shot)40.13
BBH (3-Shot)23.49
MATH Lvl 5 (4-Shot)7.40
GPQA (0-shot)3.36
MuSR (0-shot)11.00
MMLU-PRO (5-shot)28.60