Downloads · 30 days
11
10% of all-time downloads
devanshdhir/qwen3-flask-full
qwen3-flask-full is a text generation model from devanshdhir. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This is a fully merged fine-tuned model based on Qwen/Qwen3-0.6B-Base. It was trained on a rich developer-focused Q&A dataset covering Flask internals. Fine-tuning was done using LoRA (Low-Rank Adaptation) and later m…
Downloads · 30 days
11
10% of all-time downloads
All-time downloads
108
Public
Parameters
610M
550 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors539 MB · 97%
How the weights are stored.
U8454M · 74%
From the Hugging Face model README
This is a fully merged fine-tuned model based on Qwen/Qwen3-0.6B-Base. It was trained on a rich developer-focused Q&A dataset covering Flask internals. Fine-tuning was done using LoRA (Low-Rank Adaptation) and later merged into the base model for ease of deployment.
Flask’s documentation, while comprehensive, often lacks developer-centric summaries or Q&A-style explanations. This project bridges that gap by:
before_request, url_defaults, etc.)A custom script extracted:
.py files)Total Q&A pairs generated: 1425
Example:
{
"instruction": "What does `before_request` do in Flask?",
"input": "This function runs before each request, useful for checking login sessions, etc.",
"output": "`before_request` is a Flask decorator used to register a function that runs before each request. It is commonly used to implement access control logic or session checks."
}
## 🧪 Fine-Tuning Details
- **Model**: Qwen/Qwen3-0.6B-Base
- **PEFT Type**: LoRA (r=8, alpha=16)
- **Quantization**: 4-bit NF4 using `bitsandbytes`
- **Training Library**: `transformers`, `peft`, `datasets`
- **Device**: Single NVIDIA RTX 3060 6GB VRAM (consumer laptop)
- **Dataset**: 1000+ cleaned Q&A pairs from Flask official documentation
---
## 🧠 Prompt Format
The model was fine-tuned on Alpaca-style prompts:
```text
### Instruction:
<What do you want to know?>
### Input:
<Any supporting context>
### Response:
<Model-generated answer>
Used PEFT + LoRA with:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("devanshdhir/qwen3-flask-full", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("devanshdhir/qwen3-flask-full", trust_remote_code=True)
prompt = """### Instruction:
What is the purpose of `url_defaults` in Flask?
### Input:
Related excerpt from docs...
### Response:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=300)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))