Downloads · 30 days
0
devanshdhir/qwen3-flask-lora
qwen3-flask-lora is a machine learning model from devanshdhir. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
This repository contains the LoRA adapter only version of Qwen/Qwen3-0.6B-Base, fine-tuned on a high-quality dataset derived from Flask's official documentation, source code, and changelogs.
Downloads · 30 days
0
Access
Public
Updated Jul 16, 2025
Repo size
133 MB
Likes
1
Public
Click a slice to open those files.
.pt81.4 MB · 43%
From the Hugging Face model README
This repository contains the LoRA adapter only version of Qwen/Qwen3-0.6B-Base, fine-tuned on a high-quality dataset derived from Flask's official documentation, source code, and changelogs.
Use this if you want a lightweight, plug-and-play adapter on top of the base Qwen3-0.7B model.
before_request, url_defaults, etc.)| Setting | Value |
|---|---|
| PEFT method | LoRA (Low-Rank Adaptation) |
| LoRA Rank | 16 |
| Alpha | 32 |
| Target Modules | query_key_value |
| Quantization | 4-bit NF4 (bitsandbytes) |
| Base Model | Qwen/Qwen3-0.6B-Base |
Example:
{
"instruction": "How does `url_defaults` work in Flask?",
"input": "When used on an app, this is called for every request...",
"output": "`url_defaults` is triggered for every request when registered on an app. When registered on a blueprint, it affects only requests handled by that blueprint..."
}
### Instruction:
What is the difference between `url_defaults` on app vs blueprint?
### Input:
Docstring excerpt from Flask...
### Response:
<Model-generated explanation>
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B-Base", trust_remote_code=True, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6B-Base", trust_remote_code=True)
model = PeftModel.from_pretrained(base_model, "devanshdhir/qwen3-flask-lora")
prompt = """### Instruction:
What does `before_request` do in Flask?
### Input:
None
### 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))
Use devanshdhir/qwen3-flask-full It has the LoRA adapter merged into the base weights for direct inference — no PEFT loading required.
@misc{qwen3flasklora2025,
title = {Qwen3-Flask LoRA Adapter},
author = {Devansh Dhir},
year = {2025},
url = {https://huggingface.co/devanshdhir/qwen3-flask-lora}
}