aymanbakiri commited on
Commit
addda8e
verified
1 Parent(s): c8913e0

Add model card

Browse files
Files changed (1) hide show
  1. README.md +59 -0
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - text-generation
6
+ - question-answering
7
+ - mcqa
8
+ - merged
9
+ - sft
10
+ - lora
11
+ base_model: AnnaelleMyriam/SFT_M3_model
12
+ ---
13
+
14
+ # MNLP M3 MCQA Merged Model
15
+
16
+ This model is a merged version of:
17
+ - **Base SFT Model**: `AnnaelleMyriam/SFT_M3_model`
18
+ - **LoRA Adapter**: `aymanbakiri/MNLP_M3_mcqa_adapter_test`
19
+
20
+ ## Model Description
21
+
22
+ This is a specialized model for Multiple Choice Question Answering (MCQA) tasks, created by:
23
+ 1. Starting with the SFT model `AnnaelleMyriam/SFT_M3_model`
24
+ 2. Fine-tuning with LoRA adapters on MCQA data
25
+ 3. Merging the LoRA weights back into the base model
26
+
27
+ ## Usage
28
+
29
+ ```python
30
+ from transformers import AutoModelForCausalLM, AutoTokenizer
31
+
32
+ model = AutoModelForCausalLM.from_pretrained("aymanbakiri/MNLP_M3_mcqa_model_test")
33
+ tokenizer = AutoTokenizer.from_pretrained("aymanbakiri/MNLP_M3_mcqa_model_test")
34
+
35
+ # Example usage for MCQA
36
+ prompt = """You are an expert at answering multiple choice questions. Choose the best answer from the given options.
37
+
38
+ Question: What is the capital of France?
39
+ Options: (A) London (B) Berlin (C) Paris (D) Madrid
40
+ Answer:"""
41
+
42
+ inputs = tokenizer(prompt, return_tensors="pt")
43
+ outputs = model.generate(**inputs, max_new_tokens=5)
44
+ answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
45
+ print(answer)
46
+ ```
47
+
48
+ ## Training Details
49
+
50
+ - Base Model: SFT model fine-tuned for instruction following
51
+ - LoRA Configuration: r=8, alpha=32, dropout=0.1
52
+ - Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, lm_head
53
+ - Training Data: MNLP M2 MCQA Dataset
54
+ - Training Epochs: 1
55
+ - Learning Rate: 5e-05
56
+
57
+ ## Performance
58
+
59
+ This merged model provides the benefits of LoRA fine-tuning while being easier to deploy and use as a single model file.