Update README.md
Browse files
README.md
CHANGED
|
@@ -5,10 +5,10 @@
|
|
| 5 |
Notably, this CoT-enabled model was trained using only a single RTX 4090D, achieved through optimizations in both GPU VRAM and system RAM management, as well as specific techniques applied during the training steps.
|
| 6 |
### Model Overview
|
| 7 |
|
| 8 |
-
**Hicoder-R1-Distill-Gemma-27B** is a large language model fine-tuned from Google's **Gemma-
|
| 9 |
|
| 10 |
-
* **Base Model:** google/gemma-
|
| 11 |
-
* **Fine-tuned by:**
|
| 12 |
* **Focus Areas:** Chain-of-Thought (CoT), Code Generation, Code Explanation, Debugging
|
| 13 |
* **Language:** Primarily English for prompts and reasoning, generates code in multiple languages.
|
| 14 |
|
|
@@ -16,7 +16,7 @@ Notably, this CoT-enabled model was trained using only a single RTX 4090D, achie
|
|
| 16 |
|
| 17 |
* **Enhanced CoT Reasoning:** Explicitly trained to break down complex problems into intermediate steps before providing a final answer, particularly useful for complex coding or algorithmic tasks.
|
| 18 |
* **Strong Coding Capabilities:** Generates, explains, debugs, and translates code across various programming languages (e.g., Python, JavaScript, Java, C++, SQL, etc.).
|
| 19 |
-
* **Gemma-
|
| 20 |
* **Distillation Enhanced (Implied):** Potentially benefits from knowledge distillation for improved performance relative to standard fine-tuning on the target tasks.
|
| 21 |
|
| 22 |
### How to Use
|
|
@@ -28,7 +28,7 @@ import torch
|
|
| 28 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 29 |
|
| 30 |
# Specify the path to your fine-tuned model (local or Hugging Face Hub ID)
|
| 31 |
-
model_id = "
|
| 32 |
|
| 33 |
# Load tokenizer and model
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
@@ -90,7 +90,7 @@ print(response_cot)
|
|
| 90 |
|
| 91 |
### Limitations and Bias
|
| 92 |
|
| 93 |
-
* This model is based on Gemma-
|
| 94 |
* While fine-tuned for coding, it may still generate incorrect, inefficient, or insecure code. **Always review and test generated code thoroughly.**
|
| 95 |
* The model's knowledge is limited to its training data cutoff.
|
| 96 |
* Like all LLMs, it may exhibit biases present in the underlying training data.
|
|
@@ -98,7 +98,7 @@ print(response_cot)
|
|
| 98 |
|
| 99 |
### License
|
| 100 |
|
| 101 |
-
The license for this model depends on the base Gemma-2 model's license and any additional terms you impose. The Gemma-
|
| 102 |
|
| 103 |
* **Gemma Terms of Use:** [Link to Google's Gemma Terms, e.g., https://ai.google.dev/gemma/terms]
|
| 104 |
* **Fine-tuning Specific License (if any):** [Specify if you add Apache 2.0, MIT, etc., or state it follows the base model license]
|
|
@@ -116,7 +116,7 @@ If you use this model in your research or work, please consider citing:
|
|
| 116 |
}
|
| 117 |
|
| 118 |
@misc{gemma2_2024,
|
| 119 |
-
title={Gemma
|
| 120 |
author={Gemma Team, Google},
|
| 121 |
year={2024},
|
| 122 |
howpublished={\url{https://ai.google.dev/gemma}} % Replace with actual Gemma 2 paper/report link if available
|
|
@@ -134,7 +134,7 @@ For questions, feedback, or issues, please contact tonyli288@gmail.com.
|
|
| 134 |
|
| 135 |
### 模型概述
|
| 136 |
|
| 137 |
-
**Hicoder-R1-Distill-Gemma-27B** 是一个基于 Google **Gemma-
|
| 138 |
|
| 139 |
* **基础模型:** google/gemma-2-27b (或指定使用的确切变体,例如 gemma-2-27b-it)
|
| 140 |
* **微调者:** [您的姓名/组织名称]
|
|
@@ -157,8 +157,7 @@ import torch
|
|
| 157 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 158 |
|
| 159 |
# 指定您的微调模型的路径 (本地路径或 Hugging Face Hub ID)
|
| 160 |
-
model_id = "
|
| 161 |
-
|
| 162 |
# 加载分词器和模型
|
| 163 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 164 |
model = AutoModelForCausalLM.from_pretrained(
|
|
@@ -215,7 +214,7 @@ print(response_cot)
|
|
| 215 |
|
| 216 |
```
|
| 217 |
|
| 218 |
-
**提示词技巧 (Prompting):** 为了获得最佳效果,尤其是在需要 CoT
|
| 219 |
|
| 220 |
### 局限性与偏见
|
| 221 |
|
|
|
|
| 5 |
Notably, this CoT-enabled model was trained using only a single RTX 4090D, achieved through optimizations in both GPU VRAM and system RAM management, as well as specific techniques applied during the training steps.
|
| 6 |
### Model Overview
|
| 7 |
|
| 8 |
+
**Hicoder-R1-Distill-Gemma-27B** is a large language model fine-tuned from Google's **Gemma-3 27B** base model. This model is specifically optimized for **Chain-of-Thought (CoT) reasoning** and **code generation** tasks.
|
| 9 |
|
| 10 |
+
* **Base Model:** google/gemma-3-27b
|
| 11 |
+
* **Fine-tuned by:** tonyli8623
|
| 12 |
* **Focus Areas:** Chain-of-Thought (CoT), Code Generation, Code Explanation, Debugging
|
| 13 |
* **Language:** Primarily English for prompts and reasoning, generates code in multiple languages.
|
| 14 |
|
|
|
|
| 16 |
|
| 17 |
* **Enhanced CoT Reasoning:** Explicitly trained to break down complex problems into intermediate steps before providing a final answer, particularly useful for complex coding or algorithmic tasks.
|
| 18 |
* **Strong Coding Capabilities:** Generates, explains, debugs, and translates code across various programming languages (e.g., Python, JavaScript, Java, C++, SQL, etc.).
|
| 19 |
+
* **Gemma-3 Foundation:** Built upon the powerful and efficient architecture of Google's Gemma-3 27B model.
|
| 20 |
* **Distillation Enhanced (Implied):** Potentially benefits from knowledge distillation for improved performance relative to standard fine-tuning on the target tasks.
|
| 21 |
|
| 22 |
### How to Use
|
|
|
|
| 28 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 29 |
|
| 30 |
# Specify the path to your fine-tuned model (local or Hugging Face Hub ID)
|
| 31 |
+
model_id = "tonyli8623/Hicoder-R1-Distill-Gemma-27B"
|
| 32 |
|
| 33 |
# Load tokenizer and model
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
|
|
| 90 |
|
| 91 |
### Limitations and Bias
|
| 92 |
|
| 93 |
+
* This model is based on Gemma-3, and inherits its capabilities and limitations.
|
| 94 |
* While fine-tuned for coding, it may still generate incorrect, inefficient, or insecure code. **Always review and test generated code thoroughly.**
|
| 95 |
* The model's knowledge is limited to its training data cutoff.
|
| 96 |
* Like all LLMs, it may exhibit biases present in the underlying training data.
|
|
|
|
| 98 |
|
| 99 |
### License
|
| 100 |
|
| 101 |
+
The license for this model depends on the base Gemma-2 model's license and any additional terms you impose. The Gemma-3 models are typically governed by the "Gemma Terms of Use". Please consult the specific license file included with the model or the Gemma Terms of Use.
|
| 102 |
|
| 103 |
* **Gemma Terms of Use:** [Link to Google's Gemma Terms, e.g., https://ai.google.dev/gemma/terms]
|
| 104 |
* **Fine-tuning Specific License (if any):** [Specify if you add Apache 2.0, MIT, etc., or state it follows the base model license]
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
@misc{gemma2_2024,
|
| 119 |
+
title={Gemma 3 Technical Report},
|
| 120 |
author={Gemma Team, Google},
|
| 121 |
year={2024},
|
| 122 |
howpublished={\url{https://ai.google.dev/gemma}} % Replace with actual Gemma 2 paper/report link if available
|
|
|
|
| 134 |
|
| 135 |
### 模型概述
|
| 136 |
|
| 137 |
+
**Hicoder-R1-Distill-Gemma-27B** 是一个基于 Google **Gemma-3 27B** (基���模型进行微调的大型语言模型。该模型专门针对**思维链 (Chain-of-Thought, CoT) 推理**和**代码生成**任务进行了优化。
|
| 138 |
|
| 139 |
* **基础模型:** google/gemma-2-27b (或指定使用的确切变体,例如 gemma-2-27b-it)
|
| 140 |
* **微调者:** [您的姓名/组织名称]
|
|
|
|
| 157 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 158 |
|
| 159 |
# 指定您的微调模型的路径 (本地路径或 Hugging Face Hub ID)
|
| 160 |
+
model_id = "tonyli8623/Hicoder-R1-Distill-Gemma-27B"
|
|
|
|
| 161 |
# 加载分词器和模型
|
| 162 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 163 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
|
| 214 |
|
| 215 |
```
|
| 216 |
|
| 217 |
+
**提示词技巧 (Prompting):** 为了获得最佳效果,尤其是在需要 CoT 推理时,请明确要求模型“逐步思考”或“在代码前提供你的推理过程”。如添加system prompts "你是一位精通各种编程语言的代码工程师。在回答之前,请仔细思考问题,并创建一个逻辑连贯的思考过程,以<think>开始,以</think>结束,思考完后给出答案。"
|
| 218 |
|
| 219 |
### 局限性与偏见
|
| 220 |
|