Text Generation
Transformers
Safetensors
designcoder
ui-generation
front-end
html
css
javascript
code-generation
full-sft
Instructions to use xingxm/DesignCoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xingxm/DesignCoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xingxm/DesignCoder")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("xingxm/DesignCoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xingxm/DesignCoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xingxm/DesignCoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xingxm/DesignCoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/xingxm/DesignCoder
- SGLang
How to use xingxm/DesignCoder with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "xingxm/DesignCoder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xingxm/DesignCoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "xingxm/DesignCoder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xingxm/DesignCoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use xingxm/DesignCoder with Docker Model Runner:
docker model run hf.co/xingxm/DesignCoder
| model,n,overall_v592,prompt_fit,static,frozen,overall_landing,overall_dashboard,overall_track_A,overall_track_B,static_dim_layout,static_dim_typography,static_dim_component,static_dim_assets,static_dim_visual,static_defect_clean_rate,frozen_dim_alignment,frozen_dim_layout,frozen_dim_typography,frozen_dim_components,frozen_dim_assets,frozen_dim_aesthetics,frozen_pass_rate,render_fail,std | |
| 27B_AdamW_step400,200,87.04,84.10,87.31,88.52,89.65,82.19,86.56,88.16,87.18,88.88,82.62,78.59,98.12,92.14,89.77,91.81,91.12,89.58,67.12,96.29,88.60,0,10.92 | |
| 9B_AdamW_step200,200,82.14,78.35,82.20,85.41,86.96,73.19,82.71,80.82,82.10,84.64,74.46,78.35,93.50,88.15,87.01,87.53,89.88,85.17,62.84,95.27,85.37,1,11.99 | |
| 4B_AdamW_step200,200,80.06,75.25,80.40,83.27,85.70,69.59,80.61,78.78,79.93,81.98,71.65,77.11,93.88,87.05,83.77,87.77,86.92,81.81,62.33,93.35,83.24,1,13.47 | |
| 4B_Muon_step200,200,71.34,64.60,70.96,79.79,78.48,58.06,72.05,69.68,69.76,66.88,61.91,71.87,89.38,79.65,80.84,83.85,85.67,77.46,55.48,90.15,79.43,3,15.34 | |