Instructions to use cmu-lti/osim-8b-mid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cmu-lti/osim-8b-mid with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cmu-lti/osim-8b-mid") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cmu-lti/osim-8b-mid") model = AutoModelForCausalLM.from_pretrained("cmu-lti/osim-8b-mid") messages = [ {"role": "user", "content": "Who are you?"}, ] 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 Settings
- vLLM
How to use cmu-lti/osim-8b-mid with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cmu-lti/osim-8b-mid" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cmu-lti/osim-8b-mid", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cmu-lti/osim-8b-mid
- SGLang
How to use cmu-lti/osim-8b-mid 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 "cmu-lti/osim-8b-mid" \ --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": "cmu-lti/osim-8b-mid", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "cmu-lti/osim-8b-mid" \ --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": "cmu-lti/osim-8b-mid", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cmu-lti/osim-8b-mid with Docker Model Runner:
docker model run hf.co/cmu-lti/osim-8b-mid
OSim-8B-Mid
OSim-8B-Mid is the midtrained checkpoint of OSim (OdysSim), a foundation model for human behavior simulation — trained to imitate the human / user side of interactions rather than to behave as a helpful assistant.
It is Qwen/Qwen3-8B-Base midtrained on the OdysSim corpus: 62 public behavioral datasets unified into a common conversational format (~21.4M interactions, ~10B tokens), organized along the five Soul capability axes — CONV (discourse/interaction), SS (social skills), COG (cognitive / mental-state reasoning), ROLE (persona, roleplay, pedagogy), and EVAL (judgment / preference). Midtraining shifts the base model's prior toward the human-side distribution, avoiding the verbose, agreeable "assistant register" induced by helpfulness post-training.
This is the mid stage only (no task-specific RL or expert distillation). For the post-trained instruct model, see sunweiwei/OSim-Inst-8B.
Intended use
Simulating the human/user side of conversations — user simulation for agent evaluation, social simulation, and persona / role-play. The model is conditioned on a social-context system prompt describing who is speaking (role, goal, background, conversational style); given the other party's turns it generates the next human turn.
Results (from the paper)
On the held-out OdysSim evaluation, OSim-8B-Mid attains PPL 4.95 / BLEU 26.72 — the lowest perplexity among 8B behavioral-simulation baselines (UserLM-8B 8.38, CoSER-8B 8.77, Llama-3.1-8B 10.04).
Training
- Base: Qwen3-8B-Base
- Stage: midtraining (SFT on the OdysSim corpus, ~10B tokens / 4,500 steps)
- Optimizer: AdamW, peak LR 1e-5, 16K-input / 8K-response context, global batch 1,024, bf16, FSDP-2.
Citation
If you use this model, please cite the OdysSim paper (Building Foundation Models for Human Behavior Simulation). Code: https://github.com/sunnweiwei/OdysSim
- Downloads last month
- -
Model tree for cmu-lti/osim-8b-mid
Base model
Qwen/Qwen3-8B-Base