Update README.md
Browse files
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
license: gemma
|
| 3 |
language: en
|
| 4 |
library_name: transformers
|
| 5 |
-
base_model:
|
| 6 |
datasets:
|
| 7 |
- iamtarun/code_instructions_120k_alpaca
|
| 8 |
tags:
|
|
@@ -11,18 +11,19 @@ tags:
|
|
| 11 |
- instruction-following
|
| 12 |
- code
|
| 13 |
- alpaca
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
# Gemma-3-1B-Code-Alpaca-FT
|
| 17 |
|
| 18 |
-
This is a fine-tuned version of
|
| 19 |
|
| 20 |
## Model Details
|
| 21 |
|
| 22 |
### Technical Specifications
|
| 23 |
|
| 24 |
-
- **Context Window:** 8192 tokens
|
| 25 |
-
- **Max New Tokens:**
|
| 26 |
|
| 27 |
### Intended Use
|
| 28 |
|
|
@@ -63,7 +64,11 @@ print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
|
| 63 |
|
| 64 |
### Limitations and Bias
|
| 65 |
|
| 66 |
-
This model inherits the limitations and biases of the base `
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
## Fine-tuning Details
|
| 69 |
|
|
@@ -73,7 +78,17 @@ This model was fine-tuned on the [`iamtarun/code_instructions_120k_alpaca`](http
|
|
| 73 |
|
| 74 |
### Training Procedure
|
| 75 |
|
| 76 |
-
The model was fine-tuned using the LoRA (Low-Rank Adaptation) methodology
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
## Original Model Citation
|
| 79 |
|
|
|
|
| 2 |
license: gemma
|
| 3 |
language: en
|
| 4 |
library_name: transformers
|
| 5 |
+
base_model: unsloth/gemma-3-1b-it
|
| 6 |
datasets:
|
| 7 |
- iamtarun/code_instructions_120k_alpaca
|
| 8 |
tags:
|
|
|
|
| 11 |
- instruction-following
|
| 12 |
- code
|
| 13 |
- alpaca
|
| 14 |
+
- unsloth
|
| 15 |
---
|
| 16 |
|
| 17 |
# Gemma-3-1B-Code-Alpaca-FT
|
| 18 |
|
| 19 |
+
This is a fine-tuned version of the `unsloth/gemma-3-1b-it` model. It was fine-tuned by [prathmesh-nik](https://huggingface.co/prathmesh-nik) on the [`iamtarun/code_instructions_120k_alpaca`](https://huggingface.co/datasets/iamtarun/code_instructions_120k_alpaca) dataset to enhance its ability to follow instructions related to code generation and general programming tasks.
|
| 20 |
|
| 21 |
## Model Details
|
| 22 |
|
| 23 |
### Technical Specifications
|
| 24 |
|
| 25 |
+
- **Context Window:** The model's configuration (`config.json`) specifies a theoretical maximum context of 32,768 tokens. However, it is based on `unsloth/gemma-3-1b-it`, which is optimized for an **8192 token** context. Furthermore, this fine-tune was performed with a `max_seq_length` of only **2048 tokens**. For best results, it is recommended to use this model with sequences close to the 2048 token training length.
|
| 26 |
+
- **Max New Tokens:** This is a parameter set during inference, not an intrinsic property of the model. The example code uses a default, but you can set this value higher or lower based on your needs (up to the context window limit).
|
| 27 |
|
| 28 |
### Intended Use
|
| 29 |
|
|
|
|
| 64 |
|
| 65 |
### Limitations and Bias
|
| 66 |
|
| 67 |
+
This model inherits the limitations and biases of the base `unsloth/gemma-3-1b-it` model and the training dataset.
|
| 68 |
+
|
| 69 |
+
- **Short Context Training:** Since the model was fine-tuned on sequences of only 2048 tokens, its performance on tasks requiring a very long context (i.e., approaching the 8192 token limit) may be degraded.
|
| 70 |
+
- **Quantization-Aware Training:** The adapters were trained on a 4-bit model. While the final model is full-precision, this process can introduce subtle differences compared to training in full precision.
|
| 71 |
+
- **General Limitations:** As a model fine-tuned on a specific dataset, it may not be as effective for general-purpose tasks and may not always provide correct answers. It may generate incorrect or insecure code and should not be used for mission-critical applications without human oversight.
|
| 72 |
|
| 73 |
## Fine-tuning Details
|
| 74 |
|
|
|
|
| 78 |
|
| 79 |
### Training Procedure
|
| 80 |
|
| 81 |
+
The model was fine-tuned using the LoRA (Low-Rank Adaptation) methodology. Key aspects of the training include:
|
| 82 |
+
|
| 83 |
+
- **Unsloth Optimization:** The training was performed using the [Unsloth](https://github.com/unslothai/unsloth) library, which enables significantly faster training and lower memory usage.
|
| 84 |
+
- **4-bit Quantization:** For maximum efficiency, the LoRA adapters were trained on a 4-bit quantized version of the base model. The final merged model is in full precision (`bfloat16`).
|
| 85 |
+
- **Parameter-Efficient Fine-Tuning (PEFT):** Only a small fraction of the model's parameters (the LoRA adapters) were trained, making the process highly efficient.
|
| 86 |
+
|
| 87 |
+
## Repository and Training Code
|
| 88 |
+
|
| 89 |
+
This model was fine-tuned by [prathmesh_nik](https://huggingface.co/prathmesh-nik). The complete source code for the fine-tuning process, including data preparation, training, and merging scripts, is available on GitHub.
|
| 90 |
+
|
| 91 |
+
- **GitHub Repository:** [https://github.com/prathmeshnik]
|
| 92 |
|
| 93 |
## Original Model Citation
|
| 94 |
|