File size: 3,369 Bytes
0012f01 84b46d4 0012f01 84b46d4 0012f01 84b46d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
---
language:
- en
license: apache-2.0
tags:
- text-generation
- technical-documentation
- readme
- qwen
- qlora
pipeline_tag: text-generation
base_model: Qwen/Qwen2.5-Coder-7B-Instruct
model-index:
- name: Tech-Scribe-v1
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: collected_data_external
type: tech-docs
metrics:
- type: loss
value: 1.1258
---
# Tech Scribe (Qwen 2.5 7B Fine-tune)
**Tech Scribe** is a specialized language model fine-tuned to generate high-quality, structured technical documentation (READMEs, Model Cards) from simple project descriptions. It is built on top of `Qwen/Qwen2.5-Coder-7B-Instruct` using QLoRA.
## Usage
```python
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
# Config for 4-bit loading
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_quant_type="nf4"
)
# Load Base Model
base_model_name = "Qwen/Qwen2.5-Coder-7B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
base_model_name,
quantization_config=bnb_config,
device_map="auto"
)
# Load Tech Scribe Adapter
adapter_name = "Darmm/tech-scribe-v1" # Example path
model = PeftModel.from_pretrained(model, adapter_name)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Generate
project_idea = "A Python library for real-time sentiment analysis using websockets"
prompt = f"### Instruction:\nWrite a high-quality technical README or Model Card for the project \"{project_idea}\".\n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True).split("### Response:")[1])
```
## Model Description
- **Developed by:** Darmm Lab
- **Base Model:** `Qwen/Qwen2.5-Coder-7B-Instruct`
- **Fine-tuning Method:** QLoRA (4-bit quantization with LoRA adapters)
- **Task:** Technical Documentation Generation
- **Language:** English
## Training (summary)
The model was fine-tuned on a curated dataset of high-quality READMEs from top open-source repositories (e.g., PyTorch, FastAPI, React, HuggingFace Transformers).
- **Epochs:** 1 (Prototype run)
- **Batch size:** 1 (Gradient Accumulation: 8)
- **Learning rate:** 2e-4
- **Optimizer:** AdamW
- **Hardware:** NVIDIA A100 80GB
## Metrics
```json
{
"eval_loss": 1.1258,
"train_loss": 1.2937,
"epoch": 0.73
}
```
## Intended Use
- Rapidly generating boilerplate documentation for new software projects.
- converting rough notes into structured Markdown documentation.
- Learning best practices for technical writing structure.
## Limitations
- **Prototype Status:** This model was trained on a small subset of data for demonstration purposes.
- **Hallucination:** Like all LLMs, it may generate plausible-sounding but incorrect installation instructions or API calls. Always verify the generated code.
## Citation
```bibtex
@misc{techscribe2026,
author = {Darmm Lab},
title = {Tech Scribe: Automated Technical Documentation Generator},
year = {2026},
publisher = {Hugging Face},
journal = {Hugging Face Repository},
howpublished = {\url{https://huggingface.co/Darmm/tech-scribe-v1}}
}
```
|