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
File size: 1,592 Bytes
eb98c6f 4b4a4e4 eb98c6f 4b4a4e4 eb98c6f 4b4a4e4 eb98c6f 4b4a4e4 eb98c6f | 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 | {
"frozen_per_case": {
"n_prompts": 200,
"checks_total": 4983,
"per_prompt": {
"min": 23,
"max": 25,
"mean": 24.91
},
"distribution": {
"23": 1,
"24": 15,
"25": 184
},
"by_dimension": {
"Alignment": 616,
"Layout": 842,
"Typography": 642,
"Components": 1517,
"Assets": 584,
"Aesthetics": 782
},
"by_track_surface": {
"A/dashboard": 1000,
"A/landing": 2486,
"B/dashboard": 748,
"B/landing": 749
},
"scale": "binary 0/1",
"all_check_with_screenshot": true
},
"fixed_per_surface": {
"landing": {
"prompt_fit": 5,
"defect_checks": 27,
"detail_checks": 8,
"static_dimensions": [
"Layout & Composition",
"Typography & Readability",
"Component & Interaction Design",
"Assets & Semantic Fit",
"Visual System Design"
]
},
"dashboard": {
"prompt_fit": 5,
"defect_checks": 25,
"detail_checks": 9,
"static_dimensions": [
"Layout & Composition",
"Typography & Readability",
"Component & Interaction Design",
"Visual System Design"
]
}
},
"scales": {
"prompt_fit": "0/1/2",
"defect_checks": "2 clean, 0 fail, N/A when inapplicable",
"detail_checks": "0/1/2, N/A when inapplicable"
},
"aggregation": "Unweighted mean of top-level slots: Prompt Fit (1 slot) + each active static dimension (1 slot each) + the whole Frozen family (1 slot, itself the equal mean of its per-dimension means)."
} |