pcalhoun commited on
Commit
12c680a
·
verified ·
1 Parent(s): 0321305

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +342 -3
README.md CHANGED
@@ -1,3 +1,342 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - language-learning
5
+ - ILR
6
+ - assessment
7
+ - multilingual
8
+ - education
9
+ - Qwen3
10
+ - fine-tuned
11
+ license: apache-2.0
12
+ base_model: unsloth/Qwen3-4B-unsloth-bnb-4bit
13
+ datasets:
14
+ - pcalhoun/ILR-Assistant
15
+ language:
16
+ - ar
17
+ - en
18
+ - multilingual
19
+ ---
20
+
21
+ # ILR Assistant - Language Assessment Generator
22
+
23
+ A fine-tuned language model designed to generate ILR (Interagency Language Roundtable) assessment examples and provide adaptive language learning assistance.
24
+
25
+ ![Demo](demo.gif)
26
+
27
+ ## Model Details
28
+
29
+ ### Model Description
30
+
31
+ This model is a fine-tuned version of Qwen3-4B specifically designed for generating language assessment materials following the ILR proficiency scale. The model can create reading comprehension examples, adjust difficulty levels based on user performance, and provide structured language learning assessments.
32
+
33
+ - **Developed by:** Paul Calhoun
34
+ - **Model type:** Causal Language Model (Fine-tuned)
35
+ - **Language(s):** Multilingual (with demonstrated Arabic capabilities)
36
+ - **License:** Apache 2.0
37
+ - **Finetuned from model:** unsloth/Qwen3-4B-unsloth-bnb-4bit
38
+
39
+ ### Model Sources
40
+
41
+ - **Repository:** https://github.com/calhounpaul/ILR-assistant
42
+ - **Dataset:** https://huggingface.co/datasets/pcalhoun/ILR-Assistant
43
+
44
+ ## Uses
45
+
46
+ ### Direct Use
47
+
48
+ The model is designed for creating ILR-compliant language assessment materials and can:
49
+
50
+ - Generate reading comprehension examples at specific ILR levels (1-3+)
51
+ - Adapt difficulty levels based on user performance
52
+ - Create structured language learning exercises
53
+ - Provide assessment content for language education programs
54
+
55
+ ### Downstream Use
56
+
57
+ This model can be integrated into:
58
+
59
+ - Language learning platforms and applications
60
+ - Educational assessment systems
61
+ - Language proficiency testing tools
62
+ - Military and government language training programs
63
+ - Academic language instruction systems
64
+
65
+ ### Out-of-Scope Use
66
+
67
+ This model is not intended for:
68
+
69
+ - General-purpose conversation or chat applications
70
+ - Professional translation services
71
+ - Content generation outside of educational/assessment contexts
72
+ - Applications requiring real-time language assessment without human oversight
73
+
74
+ ## Training Details
75
+
76
+ ### Training Data
77
+
78
+ The training dataset was created by processing approximately 300 PDFs with known ILR levels from the Defense Language Institute Foreign Language Center (DLIFLC) GLOSS repository (https://gloss.dliflc.edu). The data was processed using DeepSeek-V1 to format the content into conversational training examples.
79
+
80
+ **Dataset:** pcalhoun/ILR-Assistant
81
+ - **Source Materials:** ~300 PDFs from DLIFLC GLOSS
82
+ - **Processing Method:** DeepSeek-V1 automated formatting
83
+ - **Format:** Conversational examples with ILR level annotations
84
+
85
+ ### Training Procedure
86
+
87
+ The model was fine-tuned using LoRA (Low-Rank Adaptation) with the Unsloth framework.
88
+
89
+ #### Training Hyperparameters
90
+
91
+ - **Base Model:** unsloth/Qwen3-4B-unsloth-bnb-4bit
92
+ - **Training Framework:** Unsloth + TRL SFTTrainer
93
+ - **LoRA Rank (r):** 64
94
+ - **LoRA Alpha:** 64
95
+ - **LoRA Dropout:** 0
96
+ - **Target Modules:** q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
97
+ - **Learning Rate:** 5e-5
98
+ - **Batch Size:** 16 per device
99
+ - **Gradient Accumulation Steps:** 1
100
+ - **Max Sequence Length:** 2048
101
+ - **Training Epochs:** 1
102
+ - **Warmup Ratio:** 0.1
103
+ - **Weight Decay:** 0.01
104
+ - **Optimizer:** AdamW
105
+ - **Scheduler:** Cosine
106
+ - **Precision:** BF16 (where supported)
107
+ - **Gradient Clipping:** 1.0
108
+
109
+ ## Capabilities
110
+
111
+ ### ILR Level Management
112
+
113
+ The model demonstrates sophisticated understanding of ILR proficiency levels and can:
114
+
115
+ - Generate content appropriate for specific ILR levels (1-3+)
116
+ - Recognize when users struggle and automatically reduce difficulty levels
117
+ - Create progressive learning experiences that adapt to user performance
118
+ - Maintain consistency with official ILR assessment criteria
119
+
120
+ ### Language Assessment Features
121
+
122
+ - **Reading Comprehension:** Creates passages with accompanying questions
123
+ - **Adaptive Difficulty:** Adjusts content complexity based on user responses
124
+ - **Educational Structure:** Follows established language pedagogy principles
125
+
126
+ ## Environmental Impact
127
+
128
+ Training was optimized for efficiency using:
129
+
130
+ - **Quantization:** 4-bit quantization for reduced memory usage
131
+ - **LoRA:** Parameter-efficient fine-tuning technique
132
+ - **Framework:** Unsloth for optimized training performance
133
+
134
+ ## Technical Specifications
135
+
136
+ ### Model Architecture
137
+
138
+ - **Base Architecture:** Qwen3-4B transformer
139
+ - **Fine-tuning Method:** LoRA (Low-Rank Adaptation)
140
+ - **Quantization:** 4-bit (bnb)
141
+ - **Parameters:** ~4B (base) + LoRA adapters
142
+
143
+ ### Compute Infrastructure
144
+
145
+ - **Training:** GPU-accelerated with gradient checkpointing
146
+ - **Memory Optimization:** 4-bit quantization + LoRA
147
+ - **Framework:** Unsloth/Transformers/TRL
148
+
149
+ ## Usage Example
150
+
151
+ ```
152
+ <|im_start|>user
153
+ ILR Level 1 (Elementary):
154
+ Reads very simple texts (e.g., tourist materials) with high-frequency vocabulary. Misunderstandings common; grasps basic ideas in familiar contexts.
155
+ ILR Level 1+ (Elementary+):
156
+ Handles simple announcements, headlines, or narratives. Can locate routine professional info but struggles with structure and cohesion.
157
+ ILR Level 2 (Limited Working):
158
+ Reads straightforward factual texts on familiar topics (e.g., news, basic reports). Understands main ideas but slowly; inferences are limited.
159
+ ILR Level 2+ (Limited Working+):
160
+ Comprehends most non-technical prose and concrete professional discussions. Separates main ideas from details but misses nuance.
161
+ ILR Level 3 (General Professional):
162
+ Reads diverse authentic texts (e.g., news, reports) with near-complete comprehension. Interprets implicit meaning but struggles with complex idioms.
163
+ ILR Level 3+ (General Professional+):
164
+ Handles varied professional styles with minimal errors. Understands cultural references and complex structures, though subtleties may be missed.
165
+
166
+ Initial ILR level for this conversation: 3
167
+ Test my comprehension of Modern Standard Arabic.<|im_end|>
168
+ <|im_start|>assistant
169
+ <scorer>
170
+ I am administering an ILR level assessment.
171
+ </scorer>
172
+ في أعقاب الأزمة الاقتصادية الأخيرة، دعا المجلس المركزي إلى إصلاحات جذرية في النظام المالي. واقترح الخبراء فرض ضرائب تصاعدية على الشركات الكبرى، مع توجيه جزء من هذه الإيرادات لدعم المشاريع الصغيرة. إلا أن بعض أعضاء البرلمان عارضوا هذه الخطوة، معتبرين أنها قد تثقل كاهل القطاع الخاص وتؤثر سلباً على الاستثمارات الأجنبية. وفي المقابل، أشارت تقارير اقتصادية إلى أن هذه الإصلاحات قد تكون الحل الوحيد لتجنب انهيار العملة المحلية، خاصة بعد انخفاض احتياطي النقد الأجنبي إلى أدنى مستوياته منذ عقد.
173
+
174
+ What is the main economic concern that prompted the proposed reforms?<|im_end|>
175
+ <|im_start|>user
176
+ The main concern is the recent economic crisis and the risk of the local currency collapsing due to the foreign exchange reserve reaching its lowest level in a decade.<|im_end|>
177
+ <|im_start|>assistant
178
+ <scorer>
179
+ User answer is: Correct.
180
+ </scorer>
181
+ Why do some parliament members oppose the proposed tax reforms?<|im_end|>
182
+ <|im_start|>user
183
+ They believe the reforms could burden the private sector and negatively impact foreign investments.<|im_end|>
184
+ <|im_start|>assistant
185
+ <scorer>
186
+ User answer is: Correct.
187
+ </scorer>
188
+ What can be inferred about the experts' view of small businesses in this context?<|im_end|>
189
+ <|im_start|>user
190
+ The experts likely view small businesses as vital to economic recovery, as they propose directing part of the tax revenue to support them.<|im_end|>
191
+ <|im_start|>assistant
192
+ <scorer>
193
+ User answer is: Correct.
194
+ </scorer>
195
+ How does the passage frame the urgency of the reforms?<|im_end|>
196
+ <|im_start|>user
197
+ It suggests the reforms are critical and time-sensitive by linking them to avoiding a currency collapse and citing the severe drop in foreign reserves.<|im_end|>
198
+ <|im_start|>assistant
199
+ <scorer>
200
+ User answer is: Correct.
201
+ </scorer>
202
+ في العصر الحديث، أصبحت الاستدامة البيئية محورًا رئيسيًا للعديد من الشركات العالمية. تدرك هذه الشركات أن تبني سياسات صديقة للبيئة ليس مجرد مسؤولية أخلاقية، بل أيضًا استثمارًا ذكيًا على المدى الطويل. على سبيل المثال، تقوم بعض المؤسسات بتخفيض انبعاثات الكربون من خلال الاعتماد على الطاقة المتجددة، مما يعزز سمعتها ويقلل التكاليف التشغيلية. ومع ذلك، يواجه هذا التحول تحديات كبيرة، مثل ارتفاع التكاليف الأولية وعدم كفاية البنية التحتية في بعض المناطق. رغم ذلك، يرى الخبراء أن الفوائد المستقبلية تفوق بكثير التحديات الحالية.
203
+
204
+ What is the main reason companies are adopting environmentally friendly policies according to the passage?<|im_end|>
205
+ <|im_start|>user
206
+ Companies adopt environmentally friendly policies solely because of strict government regulations.<|im_end|>
207
+ <|im_start|>assistant
208
+ <scorer>
209
+ User answer is: Wrong.
210
+ Reduce ILR estimate to: 2+
211
+ </scorer>
212
+ انتقلت عائلة أحمد إلى مدينة جديدة بسبب عمل والده. كان أحمد يشعر بالقلق لأن عليه أن يبدأ مدرسة جديدة ويصنع أصدقاء جدد. لكن المدرسة كانت لطيفة معه، وسرعان ما تعرف على ولدين في صفه يحبان كرة القدم مثله. الآن، يشعر أحمد بسعادة أكبر لأنه يستطيع اللعب مع أصدقائه بعد المدرسة.
213
+
214
+ Why did Ahmed's family move to a new city?<|im_end|>
215
+ <|im_start|>user
216
+ Because of his father's job.<|im_end|>
217
+ <|im_start|>assistant
218
+ <scorer>
219
+ User answer is: Correct.
220
+ </scorer>
221
+ What was Ahmed worried about before starting the new school?<|im_end|>
222
+ <|im_start|>user
223
+ He was worried about starting a new school and making new friends.<|im_end|>
224
+ <|im_start|>assistant
225
+ <scorer>
226
+ User answer is: Correct.
227
+ </scorer>
228
+ How did Ahmed feel after meeting his new friends?<|im_end|>
229
+ <|im_start|>user
230
+ He felt happier because he could play football with them after school.<|im_end|>
231
+ <|im_start|>assistant
232
+ <scorer>
233
+ User answer is: Correct.
234
+ </scorer>
235
+ What common interest helped Ahmed bond with his new friends?<|im_end|>
236
+ <|im_start|>user
237
+ They all liked football (soccer).<|im_end|>
238
+ <|im_start|>assistant
239
+ <scorer>
240
+ User answer is: Correct.
241
+ </scorer>
242
+ انتقلت عائلة أحمد إلى مدينة جديدة بسبب عمل والده. كان أحمد يشعر بالقلق لأن عليه أن يبدأ مدرسة جديدة ويصنع أصدقاء جدد. لكن المدرسة كانت لطيفة معه، وسرعان ما تعرف على ولدين في صفه يحبان كرة القدم مثله. الآن، يشعر أحمد بسعادة أكبر لأنه يستطيع اللعب مع أصدقائه بعد المدرسة.
243
+
244
+ Why did Ahmed's family move to a new city?<|im_end|>
245
+ <|im_start|>user
246
+ Because of his father's job.<|im_end|>
247
+ <|im_start|>assistant
248
+ <scorer>
249
+ User answer is: Correct.
250
+ </scorer>
251
+ What was Ahmed worried about before starting the new school?<|im_end|>
252
+ <|im_start|>user
253
+ He was worried about starting a new school and making new friends.<|im_end|>
254
+ <|im_start|>assistant
255
+ <scorer>
256
+ User answer is: Correct.
257
+ </scorer>
258
+ How did Ahmed feel after meeting his new friends?<|im_end|>
259
+ <|im_start|>user
260
+ He felt happier because he could play football with them after school.<|im_end|>
261
+ <|im_start|>assistant
262
+ <scorer>
263
+ User answer is: Correct.
264
+ </scorer>
265
+ What common interest helped Ahmed bond with his new friends?<|im_end|>
266
+ <|im_start|>user
267
+ They all liked football (soccer).<|im_end|>
268
+ <|im_start|>assistant
269
+ <scorer>
270
+ User answer is: Correct.
271
+ </scorer>
272
+ تذهب سارة إلى السوق كل يوم جمعة لشراء الفواكه والخضروات الطازجة. تحب سارة التفاح والموز لأنها لذيذة ومفيدة لصحة أطفالها. أحياناً تشتري أيضاً البرتقال في فصل الشتاء لأنه غني بفيتامين سي. تفضل سارة التسوق في الصباح الباكر عندما يكون الجو لطيفاً والأسعار مناسبة.
273
+
274
+ What does Sara buy every Friday at the market?<|im_end|>
275
+ <|im_start|>user
276
+ Sara buys fresh meat and bread every Friday at the market.<|im_end|>
277
+ <|im_start|>assistant
278
+ <scorer>
279
+ User answer is: Wrong.
280
+ Reduce ILR estimate to: 2
281
+ </scorer>
282
+ في أحد أحياء القاهرة، قامت مجموعة من الشباب بتنظيم مبادرة لتنظيف الشوارع. جمعوا النفايات وفرزوا المواد القابلة لإعادة التدوير. بعد أسبوع من العمل، أصبح الحي أكثر نظافة وأكثر جمالاً. ساعدت هذه المبادرة في زيادة الوعي البيئي بين السكان. كما أشاد المسؤولون المحليون بهذا الجهد وشجعوا على تكراره في أحياء أخرى.
283
+
284
+ What did the group of young people organize in a Cairo neighborhood?<|im_end|>
285
+ <|im_start|>user
286
+ They organized a protest against pollution.<|im_end|>
287
+ <|im_start|>assistant
288
+ <scorer>
289
+ User answer is: Wrong.
290
+ Reduce ILR estimate to: 1+
291
+ </scorer>
292
+ الأسرة تذهب إلى السوق يوم السبت. يشترون الفواكه والخضروات. الأب يحب التفاح، والأم تفضل الموز. الابن الصغير يشتري حلوى.
293
+
294
+ Where does the family go on Saturday?<|im_end|>
295
+ <|im_start|>user
296
+ They go to the park.<|im_end|>
297
+ <|im_start|>assistant
298
+ <scorer>
299
+ User answer is: Wrong.
300
+ Reduce ILR estimate to: 1
301
+ </scorer>
302
+ في السوق، نبيع الفواكه والخضروات الطازجة. لدينا تفاح أحمر وأصفر، وموز ناضج. أيضا نبيع خبز أبيض وأسمر كل صباح. السوق يفتح عند الساعة الثامنة ويغلق عند الساعة الخامسة مساءً.
303
+
304
+ What items are sold in the market?<|im_end|>
305
+ ```
306
+
307
+ ## Limitations and Biases
308
+
309
+ - **Language Coverage:** Testing has been primarily conducted in Arabic
310
+ - **ILR Level Range:** Currently optimized for levels 1-3+, will require modified training for levels 4-5
311
+ - **Domain Specificity:** Trained specifically on educational/assessment content, may not generalize to other domains
312
+ - **Cultural Context:** Assessment materials may reflect the cultural contexts present in the training data
313
+
314
+ ### Recommendations
315
+
316
+ Users should:
317
+
318
+ - Validate generated content with qualified language instructors
319
+ - Monitor model outputs for cultural sensitivity and appropriateness
320
+ - Consider the model as an assessment generation tool rather than a definitive evaluation system
321
+ - Regularly evaluate and adjust ILR level assignments based on learner feedback
322
+
323
+ ## Citation
324
+
325
+ **BibTeX:**
326
+
327
+ ```bibtex
328
+ @model{calhoun_2025_ilr_assistant,
329
+ title={ILR Assistant: Fine-tuned Language Assessment Generator},
330
+ author={Calhoun, Paul},
331
+ year={2025},
332
+ url={https://huggingface.co/pcalhoun/ILR-Assistant}
333
+ }
334
+ ```
335
+
336
+ ## Model Card Authors
337
+
338
+ Paul Calhoun
339
+
340
+ ## Model Card Contact
341
+
342
+ For questions, issues, or contributions, please visit the [GitHub repository](https://github.com/calhounpaul/ILR-assistant).