Run this model with HF Jobs
Run CodeByBB/1000s-websites 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/CodeByBB/1000s-websites. 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/CodeByBB/1000s-websites 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.
Instructions to use CodeByBB/1000s-websites with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CodeByBB/1000s-websites with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-6.7b-instruct") model = PeftModel.from_pretrained(base_model, "CodeByBB/1000s-websites") - Notebooks
- Google Colab
- Kaggle
Yamamoto commited on
Commit ·
450a4c4
1
Parent(s): a2f88df
feat: model card
Browse files6 unmodified lines789106 unmodified lines- deepseek-ai/deepseek-coder-6.7b-basetags:- code---6 unmodified lines7891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491506 unmodified lines- deepseek-ai/deepseek-coder-6.7b-basetags:- code- web-design- frontend- html- css- javascript- lora- peft---# DeepSeek Coder 6.7B - Website Design Fine-tunedA fine-tuned version of DeepSeek Coder 6.7B specifically trained to generate website designs based on design specifications and requirements.## Model DescriptionThis model is a LoRA fine-tuned version of `deepseek-ai/deepseek-coder-6.7b-base` trained on a dataset of website designs. The model has been specialized to understand design requirements (industry, tone, layout, etc.) and generate appropriate HTML/CSS/JavaScript implementations for brand-specific websites.- **Base Model**: `deepseek-ai/deepseek-coder-6.7b-base`- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)- **Training Dataset**: `stellaray777/1000s-websites`- **Quantization**: 4-bit (NF4) with BitsAndBytes## Training Details### Training Configuration- **Epochs**: 3- **Batch Size**: 1 (gradient accumulation: 4)- **Learning Rate**: 2e-4- **LoRA Configuration**:- `r`: 8- `alpha`: 16- `target_modules`: ["q_proj", "v_proj"]- `lora_dropout`: 0.05- **Max Sequence Length**: 2048 tokens- **Optimizer**: paged_adamw_8bit- **Learning Rate Scheduler**: cosine- **Warmup Steps**: 50### Training Infrastructure- **Quantization**: 4-bit NF4 quantization for memory efficiency- **Gradient Checkpointing**: Enabled- **Mixed Precision**: FP16## Intended UseThis model is designed for:- Generating website designs based on design specifications- Creating HTML/CSS/JavaScript code for brand-specific websites- Understanding design requirements (industry, tone, layout, photo usage, motion) and translating them to code- Assisting front-end developers in rapid website prototyping## How to Use### Installation```bashpip install transformers torch peft bitsandbytes accelerate```### Basic Usage```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModelimport torch# Load base model and tokenizerbase_model = "deepseek-ai/deepseek-coder-6.7b-base"model = AutoModelForCausalLM.from_pretrained(base_model,load_in_4bit=True,device_map="auto",trust_remote_code=True)tokenizer = AutoTokenizer.from_pretrained(base_model)# Load LoRA weightsmodel = PeftModel.from_pretrained(model, "stellaray777/1000s-websites")# Prepare inputmessages = [{"role": "system","content": "You are a senior creative front-end engineer who designs brand-specific websites."},{"role": "user","content": "Industry: Healthcare\nTone: Professional, Trustworthy\nPage type: Landing page\nLayout: Grid-based\nPhoto usage: Medium\nTask: Design the website based on the provided HTML structure and styling."}]# Generate responseinput_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)inputs = tokenizer(input_text, return_tensors="pt").to(model.device)with torch.no_grad():outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.7)response = tokenizer.decode(outputs[0], skip_special_tokens=True)print(response)```### Interactive ChatbotUse the provided test script:```bash# From Hugging Face Hubpython src/test_trained_model.py# From local cloned modelpython src/test_trained_model.py --local```## Limitations- The model is fine-tuned on a specific dataset of website designs and may not generalize well to all design styles- Generated code may require manual review and adjustments- The model may not always produce production-ready code and should be used as a starting point- Performance depends on the quality and specificity of the design requirements provided## Model Card ContactFor questions, issues, or contributions, please refer to the main project repository.## CitationIf you use this model, please cite:```bibtex@misc{deepseek-coder-website-design,title={DeepSeek Coder 6.7B - Website Design Fine-tuned},author={Stellaray777},year={2024},publisher={Hugging Face},howpublished={\url{https://huggingface.co/stellaray777/1000s-websites}}}```
README.md+141-1