Image-Text-to-Text
Transformers
Safetensors
qwen3
text-generation
code-generation
conversational
text-generation-inference
Instructions to use luzimu/WebGenAgent-LM-8B-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use luzimu/WebGenAgent-LM-8B-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="luzimu/WebGenAgent-LM-8B-SFT") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("luzimu/WebGenAgent-LM-8B-SFT") model = AutoModelForCausalLM.from_pretrained("luzimu/WebGenAgent-LM-8B-SFT") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use luzimu/WebGenAgent-LM-8B-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "luzimu/WebGenAgent-LM-8B-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "luzimu/WebGenAgent-LM-8B-SFT", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/luzimu/WebGenAgent-LM-8B-SFT
- SGLang
How to use luzimu/WebGenAgent-LM-8B-SFT 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 "luzimu/WebGenAgent-LM-8B-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "luzimu/WebGenAgent-LM-8B-SFT", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "luzimu/WebGenAgent-LM-8B-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "luzimu/WebGenAgent-LM-8B-SFT", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use luzimu/WebGenAgent-LM-8B-SFT with Docker Model Runner:
docker model run hf.co/luzimu/WebGenAgent-LM-8B-SFT
Improve model card: Add pipeline tag, library name, code-generation tag, GitHub link, and sample usage
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,16 +1,22 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
datasets:
|
| 4 |
- luzimu/webgen-agent_train_sft
|
| 5 |
- luzimu/webgen-agent_train_step-grpo
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
# WebGen-Agent
|
| 11 |
|
| 12 |
WebGen-Agent is an advanced website generation agent designed to autonomously create websites from natural language instructions. It was introduced in the paper [WebGen-Agent: Enhancing Interactive Website Generation with Multi-Level Feedback and Step-Level Reinforcement Learning](https://arxiv.org/pdf/2509.22644v1).
|
| 13 |
|
|
|
|
|
|
|
| 14 |
## Project Overview
|
| 15 |
|
| 16 |
WebGen-Agent combines state-of-the-art language models with specialized training techniques to create a powerful website generation tool. The agent can understand natural language instructions specifying appearance and functional requirements, iteratively generate website codebases, and refine them using visual and functional feedback.
|
|
@@ -55,6 +61,23 @@ These dual rewards provide dense, reliable process supervision that significantl
|
|
| 55 |
|
| 56 |

|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
## Citation
|
| 59 |
|
| 60 |
If you find our project useful, please cite:
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- Qwen/Qwen3-8B
|
| 4 |
datasets:
|
| 5 |
- luzimu/webgen-agent_train_sft
|
| 6 |
- luzimu/webgen-agent_train_step-grpo
|
| 7 |
+
license: mit
|
| 8 |
+
pipeline_tag: image-text-to-text
|
| 9 |
+
library_name: transformers
|
| 10 |
+
tags:
|
| 11 |
+
- code-generation
|
| 12 |
---
|
| 13 |
|
| 14 |
# WebGen-Agent
|
| 15 |
|
| 16 |
WebGen-Agent is an advanced website generation agent designed to autonomously create websites from natural language instructions. It was introduced in the paper [WebGen-Agent: Enhancing Interactive Website Generation with Multi-Level Feedback and Step-Level Reinforcement Learning](https://arxiv.org/pdf/2509.22644v1).
|
| 17 |
|
| 18 |
+
Code: https://github.com/mnluzimu/WebGen-Agent
|
| 19 |
+
|
| 20 |
## Project Overview
|
| 21 |
|
| 22 |
WebGen-Agent combines state-of-the-art language models with specialized training techniques to create a powerful website generation tool. The agent can understand natural language instructions specifying appearance and functional requirements, iteratively generate website codebases, and refine them using visual and functional feedback.
|
|
|
|
| 61 |
|
| 62 |

|
| 63 |
|
| 64 |
+
## Sample Usage
|
| 65 |
+
|
| 66 |
+
For detailed installation and inference instructions, refer to the [WebGen-Agent GitHub repository](https://github.com/mnluzimu/WebGen-Agent).
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
# Example for single inference (from GitHub README)
|
| 70 |
+
python src/infer_single.py \
|
| 71 |
+
--model deepseek-chat \
|
| 72 |
+
--vlm_model Qwen/Qwen2.5-VL-32B-Instruct \
|
| 73 |
+
--instruction "Please implement a wheel of fortune website." \
|
| 74 |
+
--workspace-dir workspaces_root/test \
|
| 75 |
+
--log-dir service_logs/test \
|
| 76 |
+
--max-iter 20 \
|
| 77 |
+
--overwrite \
|
| 78 |
+
--error-limit 5
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
## Citation
|
| 82 |
|
| 83 |
If you find our project useful, please cite:
|