CoolFace
Modelpublic

aymanbakiri/MNLP_M3_mcqa_merged_model_test

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes11downloads
Model Card

MNLP M3 MCQA Merged Model

This model is a merged version of:

  • —Base SFT Model: AnnaelleMyriam/SFT_M3_model
  • —LoRA Adapter: aymanbakiri/MNLP_M3_mcqa_model_test

Model Description

This is a specialized model for Multiple Choice Question Answering (MCQA) tasks, created by:

  1. 1.Starting with the SFT model AnnaelleMyriam/SFT_M3_model
  2. 2.Fine-tuning with LoRA adapters on MCQA data
  3. 3.Merging the LoRA weights back into the base model

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("aymanbakiri/MNLP_M3_mcqa_merged_model_test")
tokenizer = AutoTokenizer.from_pretrained("aymanbakiri/MNLP_M3_mcqa_merged_model_test")

# Example usage for MCQA
prompt = """Question: What is the capital of France?
Options: (A) London (B) Berlin (C) Paris (D) Madrid
Answer:"""

inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=5)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)

Training Details

  • —Base Model: SFT model fine-tuned for instruction following
  • —LoRA Configuration: r=16, alpha=32, dropout=0.1
  • —Target Modules: qproj, kproj, vproj, oproj, gateproj, upproj, downproj, lmhead
  • —Training Data: MNLP M2 MCQA Dataset

Performance

This merged model should provide better performance than the original LoRA adapter while being easier to deploy and use.