Text Generation
PEFT
Safetensors
English
lora
qlora
code
html
css
javascript
web-development
conversational
Run this model with HF Jobs
Run lhordking/webcoder-7b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/lhordking/webcoder-7b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/lhordking/webcoder-7b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/lhordking/webcoder-7b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/lhordking/webcoder-7b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use lhordking/webcoder-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use lhordking/webcoder-7b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct") model = PeftModel.from_pretrained(base_model, "lhordking/webcoder-7b") - Notebooks
- Google Colab
- Kaggle
WebCoder-7B β Website Specialist LoRA
A QLoRA fine-tune of Qwen2.5-Coder-7B-Instruct specialized for generating complete, production-ready websites using HTML, CSS, and JavaScript.
Model Details
- Base model: Qwen/Qwen2.5-Coder-7B-Instruct
- Fine-tuning method: QLoRA (4-bit)
- LoRA rank: 64
- Precision: bf16
- Training samples: 7,731
- Epochs: 3
- Max length: 1024 tokens
Training Data
- Hoglet-33/webdev-coding-dataset
- sahil2801/CodeAlpaca-20k (web-filtered)
- HuggingFaceH4/CodeAlpaca_20K (web-filtered)
- HuggingFaceM4/WebSight (local cache)
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-7B-Instruct",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct")
model = PeftModel.from_pretrained(base, "lhordking/webcoder-7b")
prompt = "Create a responsive dark mode landing page for a SaaS product"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Example Prompts
"Create a responsive navbar with dark mode toggle""Build a SaaS landing page with hero section and pricing table""Make a login form with email and password validation""Create a portfolio page with project cards and animations"
Limitations
- Best results with HTML/CSS/JS prompts
- Output quality improves with specific, detailed prompts
- May need more training data for complex full-stack applications
- Downloads last month
- 6