FrederickSundeep commited on
Commit
6930929
Β·
verified Β·
1 Parent(s): ebe273b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +287 -0
README.md ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3-14B
4
+ tags:
5
+ - text-generation
6
+ - conversational
7
+ - fine-tuned
8
+ - qwen3
9
+ - nova
10
+ - novamind
11
+ - lora
12
+ - qlora
13
+ - unsloth
14
+ language:
15
+ - en
16
+ pipeline_tag: text-generation
17
+ library_name: transformers
18
+ model_type: qwen3
19
+ inference: true
20
+ datasets:
21
+ - custom
22
+ metrics:
23
+ - accuracy
24
+ widget:
25
+ - text: "Who are you?"
26
+ example_title: "Identity"
27
+ - text: "What is a REST API?"
28
+ example_title: "Technical Question"
29
+ - text: "Write a Python function to reverse a string"
30
+ example_title: "Code Generation"
31
+ ---
32
+
33
+ # 🧠 Nova2-14B
34
+
35
+ <p align="center">
36
+ <img src="https://img.shields.io/badge/Base%20Model-Qwen3--14B-blue?style=flat-square" />
37
+ <img src="https://img.shields.io/badge/Fine--tuned%20with-Unsloth%20%2B%20QLoRA-green?style=flat-square" />
38
+ <img src="https://img.shields.io/badge/License-Apache%202.0-orange?style=flat-square" />
39
+ <img src="https://img.shields.io/badge/Language-English-red?style=flat-square" />
40
+ <img src="https://img.shields.io/badge/Parameters-14B-purple?style=flat-square" />
41
+ </p>
42
+
43
+ **Nova2-14B** is a fine-tuned large language model built on top of [Qwen/Qwen3-14B](https://huggingface.co/Qwen/Qwen3-14B).
44
+ It is the core model powering **NovaMind** β€” an AI chat application developed by **Frederick Sundeep Mallela**.
45
+
46
+ Nova2-14B is a **fully standalone merged model** β€” the LoRA adapter has been permanently baked into the base weights,
47
+ requiring no adapter dependency at inference time.
48
+
49
+ ---
50
+
51
+ ## πŸš€ Model Description
52
+
53
+ | Property | Value |
54
+ |---|---|
55
+ | **Model Name** | Nova2-14B |
56
+ | **Developer** | Frederick Sundeep Mallela |
57
+ | **Base Model** | Qwen/Qwen3-14B |
58
+ | **Fine-tuning Method** | QLoRA (Quantized Low-Rank Adaptation) |
59
+ | **Fine-tuning Framework** | Unsloth + TRL |
60
+ | **Model Type** | Causal Language Model |
61
+ | **Parameters** | ~14.7 Billion |
62
+ | **Context Length** | 2048 tokens (base supports up to 40K) |
63
+ | **Language** | English |
64
+ | **License** | Apache 2.0 |
65
+ | **Merge Status** | βœ… Fully merged β€” standalone base model |
66
+
67
+ ---
68
+
69
+ ## πŸ’‘ What Makes Nova2-14B Different
70
+
71
+ Nova2-14B retains **all of Qwen3-14B's capabilities** β€” coding, reasoning, math, multilingual support β€”
72
+ while adding a custom persona and identity through supervised fine-tuning:
73
+
74
+ - Responds as **Nova**, an AI assistant created by Frederick
75
+ - Consistent identity across all conversation styles
76
+ - Trained to never reveal underlying architecture details
77
+ - Optimized for use in the **NovaMind** chat application
78
+
79
+ ---
80
+
81
+ ## πŸ› οΈ How to Use
82
+
83
+ ### Basic Usage
84
+
85
+ ```python
86
+ from transformers import AutoTokenizer, AutoModelForCausalLM
87
+ import torch
88
+
89
+ model_id = "FrederickSundeep/nova2-14b"
90
+
91
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
92
+ model = AutoModelForCausalLM.from_pretrained(
93
+ model_id,
94
+ torch_dtype=torch.float16,
95
+ device_map="auto",
96
+ )
97
+ model.eval()
98
+
99
+ messages = [
100
+ {"role": "system", "content": "You are Nova, an AI assistant created by Frederick."},
101
+ {"role": "user", "content": "Who are you?"},
102
+ ]
103
+
104
+ inputs = tokenizer.apply_chat_template(
105
+ messages,
106
+ tokenize=True,
107
+ add_generation_prompt=True,
108
+ enable_thinking=False,
109
+ return_tensors="pt",
110
+ ).to(model.device)
111
+
112
+ with torch.no_grad():
113
+ outputs = model.generate(
114
+ input_ids=inputs,
115
+ max_new_tokens=512,
116
+ temperature=0.7,
117
+ top_p=0.8,
118
+ top_k=20,
119
+ do_sample=True,
120
+ repetition_penalty=1.05,
121
+ pad_token_id=tokenizer.eos_token_id,
122
+ )
123
+
124
+ response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)
125
+ print(response)
126
+ ```
127
+
128
+ ### With 4-bit Quantization (Low VRAM)
129
+
130
+ ```python
131
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
132
+ import torch
133
+
134
+ bnb_config = BitsAndBytesConfig(
135
+ load_in_4bit=True,
136
+ bnb_4bit_compute_dtype=torch.float16,
137
+ bnb_4bit_use_double_quant=True,
138
+ bnb_4bit_quant_type="nf4",
139
+ )
140
+
141
+ model_id = "FrederickSundeep/nova2-14b"
142
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
143
+ model = AutoModelForCausalLM.from_pretrained(
144
+ model_id,
145
+ quantization_config=bnb_config,
146
+ device_map="auto",
147
+ )
148
+ ```
149
+
150
+ ### Recommended Generation Parameters
151
+
152
+ ```python
153
+ # For conversational / chat use
154
+ generation_config = {
155
+ "temperature": 0.7,
156
+ "top_p": 0.8,
157
+ "top_k": 20,
158
+ "repetition_penalty": 1.05,
159
+ "do_sample": True,
160
+ "max_new_tokens": 1024,
161
+ }
162
+
163
+ # For coding / precise tasks
164
+ generation_config_precise = {
165
+ "temperature": 0.3,
166
+ "top_p": 0.9,
167
+ "do_sample": True,
168
+ "max_new_tokens": 2048,
169
+ }
170
+ ```
171
+
172
+ ---
173
+
174
+ ## πŸ‹οΈ Training Details
175
+
176
+ ### Fine-tuning Setup
177
+
178
+ | Setting | Value |
179
+ |---|---|
180
+ | **Base Model** | unsloth/Qwen3-14B-bnb-4bit |
181
+ | **Method** | Supervised Fine-Tuning (SFT) with QLoRA |
182
+ | **LoRA Rank** | 16 |
183
+ | **LoRA Alpha** | 16 |
184
+ | **Target Modules** | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
185
+ | **Batch Size** | 2 (effective 8 with gradient accumulation) |
186
+ | **Gradient Accumulation** | 4 steps |
187
+ | **Learning Rate** | 2e-4 |
188
+ | **Epochs** | 3 |
189
+ | **Optimizer** | AdamW 8-bit |
190
+ | **LR Scheduler** | Linear |
191
+ | **Max Sequence Length** | 2048 |
192
+ | **Training Hardware** | NVIDIA Tesla T4 (16GB) via Google Colab |
193
+ | **Training Framework** | Unsloth + TRL SFTTrainer |
194
+ | **Thinking Mode** | Disabled (enable_thinking=False) |
195
+
196
+ ### Dataset
197
+
198
+ Custom curated dataset of conversational examples covering:
199
+ - **Identity & persona** β€” Nova's name, creator, what it is and isn't
200
+ - **Technical knowledge** β€” coding, system design, AI/ML concepts
201
+ - **Personality & tone** β€” concise, direct, technically precise responses
202
+ - **Edge cases** β€” handling questions about underlying architecture
203
+
204
+ ---
205
+
206
+ ## βš™οΈ Hardware Requirements
207
+
208
+ | Setup | VRAM | Notes |
209
+ |---|---|---|
210
+ | Full fp16 | ~28 GB | A100 80GB or 2x A40 |
211
+ | 8-bit quantized | ~15 GB | Single A100 40GB or RTX 3090 |
212
+ | 4-bit quantized | ~9 GB | Single RTX 3080/3090/4090 or T4 |
213
+ | CPU only | 32 GB RAM | Very slow β€” not recommended |
214
+
215
+ ---
216
+
217
+ ## πŸ“Š Capabilities
218
+
219
+ Nova2-14B inherits all Qwen3-14B capabilities:
220
+
221
+ - βœ… **Code generation** β€” Python, JavaScript, TypeScript, Java, C++, SQL, and more
222
+ - βœ… **Reasoning** β€” step-by-step logical problem solving
223
+ - βœ… **Math** β€” arithmetic to advanced mathematics
224
+ - βœ… **Instruction following** β€” precise task execution
225
+ - βœ… **Multilingual** β€” 100+ languages (from base model)
226
+ - βœ… **Long context** β€” supports up to 40K tokens (base architecture)
227
+ - βœ… **Tool use** β€” function calling compatible
228
+ - βœ… **System prompt** β€” fully supports custom system prompts
229
+
230
+ ---
231
+
232
+ ## πŸ”’ Intended Use
233
+
234
+ **Intended for:**
235
+ - Powering the NovaMind AI chat application
236
+ - General-purpose AI assistant tasks
237
+ - Code generation and debugging
238
+ - Technical question answering
239
+ - Further fine-tuning as a base model
240
+
241
+ **Not intended for:**
242
+ - Harmful, unethical, or illegal content generation
243
+ - Medical or legal advice without human oversight
244
+ - High-stakes autonomous decision making
245
+
246
+ ---
247
+
248
+ ## ⚠️ Limitations
249
+
250
+ - Fine-tuned on a relatively small custom dataset β€” may occasionally revert to base Qwen3 behavior in edge cases
251
+ - Not evaluated on standard benchmarks post fine-tuning
252
+ - Thinking mode disabled during fine-tuning β€” re-enable via `enable_thinking=True` in chat template if needed
253
+ - Context limited to 2048 tokens in fine-tuned configuration (base supports 40K)
254
+
255
+ ---
256
+
257
+ ## πŸ”— Related
258
+
259
+ - **NovaMind App:** AI chat application powered by this model
260
+ - **Base Model:** [Qwen/Qwen3-14B](https://huggingface.co/Qwen/Qwen3-14B)
261
+ - **Fine-tuning Framework:** [Unsloth](https://github.com/unslothai/unsloth)
262
+ - **Developer:** Frederick Sundeep Mallela
263
+
264
+ ---
265
+
266
+ ## πŸ“„ License
267
+
268
+ This model is released under the **Apache 2.0 License**, inheriting the license of the base model Qwen3-14B.
269
+
270
+ See [LICENSE](https://www.apache.org/licenses/LICENSE-2.0) for full details.
271
+
272
+ ---
273
+
274
+ ## πŸ“ Citation
275
+
276
+ If you use Nova2-14B in your research or application, please cite:
277
+
278
+ ```bibtex
279
+ @misc{nova2-14b-2025,
280
+ author = {Frederick Sundeep Mallela},
281
+ title = {Nova2-14B: A Fine-tuned Conversational AI Assistant},
282
+ year = {2025},
283
+ publisher = {HuggingFace},
284
+ howpublished = {\url{https://huggingface.co/FrederickSundeep/nova2-14b}},
285
+ note = {Fine-tuned from Qwen/Qwen3-14B using QLoRA and Unsloth}
286
+ }
287
+ ```