File size: 1,582 Bytes
71043ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
language: en
license: apache-2.0
tags:
- text-generation
- question-answering
- mcqa
- merged
- sft
- lora
base_model: AnnaelleMyriam/SFT_M3_model
---

# 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_sft_model`

## Model Description

This is a specialized model for Multiple Choice Question Answering (MCQA) tasks, created by:
1. Starting with the SFT model `AnnaelleMyriam/SFT_M3_model`
2. Fine-tuning with LoRA adapters on MCQA data
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")
tokenizer = AutoTokenizer.from_pretrained("aymanbakiri/MNLP_M3_mcqa_merged_model")

# 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: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, lm_head
- 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.