Sujith2121 commited on
Commit
afa8436
·
verified ·
1 Parent(s): 84ff570

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -38
README.md CHANGED
@@ -3,61 +3,104 @@ library_name: peft
3
  license: apache-2.0
4
  base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
5
  tags:
6
- - base_model:adapter:TinyLlama/TinyLlama-1.1B-Chat-v1.0
7
- - lora
8
- - transformers
 
 
9
  pipeline_tag: text-generation
 
10
  model-index:
11
- - name: tinyllama-dora-model
12
- results: []
 
 
 
 
 
 
 
 
 
13
  ---
14
 
15
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
- should probably proofread and complete it, then remove this comment. -->
17
-
18
  # tinyllama-dora-model
19
 
20
- This model is a fine-tuned version of [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) on an unknown dataset.
21
- It achieves the following results on the evaluation set:
22
- - Loss: 1.5644
 
 
 
 
 
 
 
 
 
23
 
24
- ## Model description
25
 
26
- More information needed
27
 
28
- ## Intended uses & limitations
 
 
29
 
30
- More information needed
31
 
32
- ## Training and evaluation data
33
 
34
- More information needed
 
35
 
36
- ## Training procedure
37
 
38
- ### Training hyperparameters
39
 
40
- The following hyperparameters were used during training:
41
- - learning_rate: 5e-05
42
- - train_batch_size: 2
43
- - eval_batch_size: 2
44
- - seed: 42
45
- - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
46
- - lr_scheduler_type: linear
47
- - num_epochs: 1
48
- - mixed_precision_training: Native AMP
49
 
50
- ### Training results
51
 
52
- | Training Loss | Epoch | Step | Validation Loss |
53
- |:-------------:|:-----:|:----:|:---------------:|
54
- | 1.5365 | 1.0 | 450 | 1.5644 |
 
 
 
 
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- ### Framework versions
58
 
59
- - PEFT 0.18.2.dev0
60
- - Transformers 5.0.0
61
- - Pytorch 2.10.0+cu128
62
- - Datasets 4.8.3
63
- - Tokenizers 0.22.2
 
3
  license: apache-2.0
4
  base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
5
  tags:
6
+ - base_model:adapter:TinyLlama/TinyLlama-1.1B-Chat-v1.0
7
+ - dora
8
+ - qlora
9
+ - transformers
10
+ - text-generation
11
  pipeline_tag: text-generation
12
+
13
  model-index:
14
+ - name: tinyllama-dora-model
15
+ results:
16
+ - task:
17
+ type: text-generation
18
+ dataset:
19
+ name: mlabonne/guanaco-llama2-1k
20
+ type: instruction-tuning
21
+ metrics:
22
+ - type: loss
23
+ value: 1.5644
24
+ name: validation_loss
25
  ---
26
 
 
 
 
27
  # tinyllama-dora-model
28
 
29
+ ## Model Description
30
+
31
+ This model is a parameter-efficient fine-tuned version of TinyLlama/TinyLlama-1.1B-Chat-v1.0 using DoRA combined with 4-bit quantization.
32
+
33
+ ---
34
+
35
+ ## Key Features
36
+
37
+ * Base Model: TinyLlama-1.1B-Chat
38
+ * Fine-tuning Method: DoRA
39
+ * Quantization: 4-bit
40
+ * Framework: Transformers + PEFT
41
 
42
+ ---
43
 
44
+ ## Intended Use
45
 
46
+ * Instruction-based text generation
47
+ * Conversational AI
48
+ * Research and experimentation
49
 
50
+ ---
51
 
52
+ ## Limitations
53
 
54
+ * Small dataset (1k samples)
55
+ * May produce incorrect outputs
56
 
57
+ ---
58
 
59
+ ## Dataset
60
 
61
+ mlabonne/guanaco-llama2-1k
 
 
 
 
 
 
 
 
62
 
63
+ ---
64
 
65
+ ## Training Details
66
+
67
+ * Learning Rate: 5e-5
68
+ * Batch Size: 2
69
+ * Epochs: 1
70
+
71
+ ---
72
 
73
+ ## Results
74
+
75
+ Validation Loss: 1.5644
76
+ Perplexity = exp(loss)
77
+
78
+ ---
79
+
80
+ ## Usage
81
+
82
+ ```python
83
+ from transformers import AutoTokenizer, AutoModelForCausalLM
84
+ from peft import PeftModel
85
+
86
+ base_model = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
87
+ adapter_model = "Sujith2121/tinyllama-dora-model"
88
+
89
+ tokenizer = AutoTokenizer.from_pretrained(adapter_model)
90
+
91
+ model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
92
+ model = PeftModel.from_pretrained(model, adapter_model)
93
+
94
+ prompt = "Explain Docker simply"
95
+
96
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
97
+ outputs = model.generate(**inputs, max_new_tokens=100)
98
+
99
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
100
+ ```
101
+
102
+ ---
103
 
104
+ ## License
105
 
106
+ Apache 2.0