Model reference · open weights

UserRepGen

LLMs microsoft Text gen 1 build Open weights 0 dl/mo

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.

  • UserRepGen-4B is a 4.5B parameter language model developed by Microsoft that generates structured user representations from multi-turn conversations.
  • It is designed to condition separate LLM-based user simulators by outputting task and behavior descriptions in JSON format.
  • The model supports a context length of 262144 tokens, operates in English, and is released under the MIT license.

Summary of the microsoft/UserRepGen-4B model card, 2026-10-15

What it is

Released bymicrosoft
Released2026-10-14
Parameters4.5B
VRAM9.1 GB for the weights

What it runs on

Memory and cards for UserRepGen-4B (BF16)

9.1 GBweights, file size
33 MBcache per 1K tokens
103 MBfixed state per request
2.1 GBruntime overhead, at least
262,144 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB110K11.6 GB
RTX 4060 Ti 16 GB113123K15.4 GB
RTX 3090 24 GB3210all 256K23.4 GB
RTX 4090 24 GB3210all 256K23.4 GB
RTX 5090 32 GB5316all 256K31.0 GB
L40S 48 GB8827all 256K44.0 GB
A100 80 GB18056all 256K78.2 GB
H100 80 GB16652all 256K78.1 GB
RTX PRO 6000 Blackwell 96 GB20865all 256K93.8 GB
DGX Spark (GB10) 128 GB unified24477all 256K107 GB
H200 141 GB327103all 256K138 GB
B200 180 GB428135all 256K176 GB
2× RTX 3060 12 GB
tensor parallel
268all 256K11.6 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
111.5 GB12.3 GB
513.0 GB17.1 GB
814.1 GB20.6 GB
1617.1 GB30.0 GB
3223.1 GB48.8 GB
6434.9 GB86.5 GB

One card, with vLLM's small-card settings.

From the model card

What microsoft says about UserRepGen

Read 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.

Model details

PropertyDescription
Developed byMicrosoft Corporation
Model typeUser-representation generator, 4B-class language model
BackboneQwen3.5-4B
AdaptationRank-64 LoRA with online supervised fine-tuning
LanguageEnglish
InputsText-only, multi-turn user-assistant conversations
OutputsText formatted as JSON with task and user_behavior fields
Training sequence length9,216 tokens: up to 8,192 prompt tokens and 1,024 completion tokens
Training datesJuly-August 2026
LicenseMIT
Repositorymicrosoft/UserRepGen-4B

Key capabilities

  • Generates structured task and user-behavior descriptions from multi-turn user-assistant conversations.
  • Captures conversational behavior including communication style, request formulation, incremental constraint disclosure, response patterns, feedback, context provision, engagement, and termination behavior.
  • Produces representations that improve conversation-reconstruction fidelity when used with an unseen LLM-based simulation environment.
  • Captures some user-specific behavioral patterns that transfer across conversations and unseen tasks.
  • Produces representations that can help simulated populations better preserve the behavioral diversity of source conversations.
  • Produces behavior descriptions that improve same-user conversation matching in the accompanying research's re-identification evaluation. This capability also presents a privacy risk; representations are not anonymized data.

How to use

The intended workflow is:

  1. Select a conversation that you are authorized to process, minimizing or removing identifying and sensitive information.
  2. Format the conversation using the model's inference prompt and chat template.
  3. Generate a representation and validate it as JSON containing task and user_behavior fields.
  4. Review the descriptions for unsupported inferences, sensitive information, and task-specific leakage.
  5. Pass the reviewed representation to a separate LLM-based user simulator.

Quickstart

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 st

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms