Ishaank18 commited on
Commit
c1bf10f
·
verified ·
1 Parent(s): baea6c5

Upload SFT model (loss=0.3815)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ base_model: unsloth/Qwen2-1.5B-Instruct-bnb-4bit
4
+ tags:
5
+ - sft
6
+ - lora
7
+ - qwen2
8
+ - adaptive-learning
9
+ - multi-level
10
+ - cmrl
11
+ license: apache-2.0
12
+ ---
13
+
14
+ # CMRL Adaptive Generator
15
+
16
+ Multi-level adaptive generator trained with SFT (Supervised Fine-Tuning) for the C-MRL (Contrastive Multi-Resolution Learning) project.
17
+
18
+ ## Model Description
19
+
20
+ This model adapts explanations to different difficulty levels:
21
+ - **Novice**: 6th grade level, simple analogies
22
+ - **Intermediate**: College student level
23
+ - **Expert**: Technical/professional explanations
24
+
25
+ ## Training Details
26
+
27
+ | Parameter | Value |
28
+ |-----------|-------|
29
+ | Base Model | unsloth/Qwen2-1.5B-Instruct-bnb-4bit |
30
+ | LoRA Rank | 32 |
31
+ | LoRA Alpha | 64 |
32
+ | Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
33
+ | Epochs | 10 |
34
+ | Learning Rate | 0.0002 |
35
+ | Final Loss | 0.3815 |
36
+
37
+ ## Usage
38
+
39
+ ```python
40
+ from unsloth import FastLanguageModel
41
+
42
+ model, tokenizer = FastLanguageModel.from_pretrained(
43
+ "Ishaank18/cmrl-adaptive-generator",
44
+ max_seq_length=2048,
45
+ load_in_4bit=True,
46
+ )
47
+ FastLanguageModel.for_inference(model)
48
+
49
+ # Generate
50
+ prompt = "Instruct: You are an adaptive tutor.\nExplain photosynthesis to a 6th grader.\nOutput:"
51
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
52
+ outputs = model.generate(**inputs, max_new_tokens=256)
53
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
54
+ ```
55
+
56
+ ## Intended Use
57
+
58
+ Educational content generation at multiple difficulty levels. Part of the CMRL RAG pipeline with hierarchical retrieval.
59
+
60
+ ## Citation
61
+
62
+ If you use this model, please cite:
63
+ ```
64
+ @misc{cmrl-adaptive-generator,
65
+ author = {CMRL Project},
66
+ title = {Multi-Level Adaptive Generator},
67
+ year = {2024},
68
+ publisher = {Hugging Face},
69
+ url = {https://huggingface.co/Ishaank18/cmrl-adaptive-generator}
70
+ }
71
+ ```
adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "Qwen2ForCausalLM",
7
+ "parent_library": "transformers.models.qwen2.modeling_qwen2",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/Qwen2-1.5B-Instruct-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 64,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0.05,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.1",
31
+ "qalora_group_size": 16,
32
+ "r": 32,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "up_proj",
37
+ "down_proj",
38
+ "k_proj",
39
+ "gate_proj",
40
+ "q_proj",
41
+ "o_proj",
42
+ "v_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": true
50
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:175ae4366b9d0e67fe9fc4f9c77256be6775fa49e67c66b36b94be9689f942b8
3
+ size 147770496
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
chat_template.jinja ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
2
+ You are a helpful assistant.<|im_end|>
3
+ ' }}{% endif %}{{'<|im_start|>' + message['role'] + '
4
+ ' + message['content'] + '<|im_end|>' + '
5
+ '}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
6
+ ' }}{% endif %}
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": "<|im_end|>"
14
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c6f32fb0a832e7efb2c2de5e805c8aaaf43e933c191ffc8d7cb56b176e0f11b
3
+ size 11418364
tokenizer_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "clean_up_tokenization_spaces": false,
35
+ "eos_token": "<|im_end|>",
36
+ "errors": "replace",
37
+ "extra_special_tokens": {},
38
+ "model_max_length": 32768,
39
+ "pad_token": "<|im_end|>",
40
+ "padding_side": "left",
41
+ "split_special_tokens": false,
42
+ "tokenizer_class": "Qwen2Tokenizer",
43
+ "unk_token": null
44
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff