Model reference · open weights
UserRepGen is an open-weight language model from microsoft. UserRepGen-4B (BF16) weighs 9.1 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the microsoft/UserRepGen-4B model card, 2026-10-15
What it is
| Released by | microsoft |
|---|---|
| Released | 2026-10-14 |
| Parameters | 4.5B |
| VRAM | 9.1 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | 1 | 10K | 11.6 GB | |
| RTX 4060 Ti 16 GB | 11 | 3 | 123K | 15.4 GB |
| RTX 3090 24 GB | 32 | 10 | all 256K | 23.4 GB |
| RTX 4090 24 GB | 32 | 10 | all 256K | 23.4 GB |
| RTX 5090 32 GB | 53 | 16 | all 256K | 31.0 GB |
| L40S 48 GB | 88 | 27 | all 256K | 44.0 GB |
| A100 80 GB | 180 | 56 | all 256K | 78.2 GB |
| H100 80 GB | 166 | 52 | all 256K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 208 | 65 | all 256K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 244 | 77 | all 256K | 107 GB |
| H200 141 GB | 327 | 103 | all 256K | 138 GB |
| B200 180 GB | 428 | 135 | all 256K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 26 | 8 | all 256K | 11.6 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 11.5 GB | 12.3 GB |
| 5 | 13.0 GB | 17.1 GB |
| 8 | 14.1 GB | 20.6 GB |
| 16 | 17.1 GB | 30.0 GB |
| 32 | 23.1 GB | 48.8 GB |
| 64 | 34.9 GB | 86.5 GB |
One card, with vLLM's small-card settings.
From the model card
UserRepGen-4B is a fine-tuned Qwen3.5-4B language model that generates a structured, natural-language user representation from a multi-turn user-assistant conversation. Each representation contains a task description and a behavior description for a user, and is intended to condition a separate LLM-based user simulator.
Unlike UserLM-8b and UserLM-2.0, which generate user utterances, UserRepGen-4B generates representations, not simulated user turns. It does not itself execute the user's task or serve as the simulator.
The model was trained with online supervised fine-tuning through hindsight distillation, using feedback obtained by comparing simulated and original user behavior. At inference time, it generates a representation directly from the source conversation without requiring simulation rollouts or hindsight feedback.
| Property | Description |
|---|---|
| Developed by | Microsoft Corporation |
| Model type | User-representation generator, 4B-class language model |
| Backbone | Qwen3.5-4B |
| Adaptation | Rank-64 LoRA with online supervised fine-tuning |
| Language | English |
| Inputs | Text-only, multi-turn user-assistant conversations |
| Outputs | Text formatted as JSON with task and user_behavior fields |
| Training sequence length | 9,216 tokens: up to 8,192 prompt tokens and 1,024 completion tokens |
| Training dates | July-August 2026 |
| License | MIT |
| Repository | microsoft/UserRepGen-4B |
The intended workflow is:
task and
user_behavior fields.The following example uses Hugging Face Transformers. The conversation is a newly written, simplified example inspired by an Excel-help conversation in WildChat; it is not an original user transcript.
import json
from pathlib import Path
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "microsoft/UserRepGen-4B"
device = "cuda" if torch.cuda.is_available() else "cpu"
if device == "cpu":
torch.set_num_threads(8)
conversation = [
{"role": "user", "content": "I need an Excel formula to count dates in A2:A100 before today plus B1."},
{"role": "assistant", "content": 'Try =COUNTIF(A2:A100,"<"&TODAY()+B1).'},
{"role": "user", "content": "That didn't work. The dates come from another formula."},
{"role": "assistant", "content": "Are those results actual Excel dates, or text that looks like dates?"},
{"role": "user", "content": "They're text. Some cells are empty too."},
{"role": "assistant", "content": "Convert the nonempty text values with DATEVALUE, then count the resulting dates."},
{"role": "user", "content": "Can you show the steps using a helper column?"},
{"role": "assistant", "content": 'In C2 enter =IF(A2="","",DATEVALUE(A2)), fill down to C100, then use =COUNTIFS(C2:C100,"0").'},
]
template = Path(
hf_hub_download(model_id, "representation_prompt.txt")
).read_text(encoding="utf-8").strip()
history = "\n".join(f"[{m['role']}]: {m['content']}" for m in conversation)
prompt = template.format(conversation_history=history)
tokenizer = AutoTokenizer.from_pretrained(model_id)
inputs = tokenizer.apply_chat_template(
[{"role": "user", "content": prompt}],
tokenize=True,
add_generation_prompt=True,
enable_thinking=False,
return_tensors="pt",
return_dict=True,
)
prompt_length = inputs["input_ids"].shape[1]
if prompt_length > 8192:
raise ValueError("The formatted prompt exceeds the 8,192-token limit.")
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype=torch.float32 if device == "cpu" else torch.bfloat16,
device_map=device,
).eval()
with torch.inference_mode():
output = model.generate(
**inputs.to(device),
max_new_tokens=1024,
do_sample=False,
temperature=None,
top_p=None,
top_k=None,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
)
text = tokenizer.decode(output[0, prompt_length:], skip_special_tokens=True).strip()
representation = json.loads(text)
if (
not isinstance(representation, dict)
or set(representation) != {"task", "user_behavior"}
or not all(isinstance(value, str) and value.strip() for value in representation.values())
):
raise ValueError("Expected nonempty task and user_behavior stQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.