Views
No views yet
[!IMPORTANT] HuatuoGPT-3-7B-Pangu is set to thinking mode by default. Since it is based on openPangu, the generated reasoning content is placed between[unused16]and[unused17], and the final response starts after[unused17].
| Model | Description | Backbone | Link |
|---|---|---|---|
| HuatuoGPT-3-32B | 32B medical LLM trained with SeedRL | Qwen3-32B | HF Link |
| HuatuoGPT-3-8B | 8B medical LLM trained with SeedRL | Qwen3-8B-Base | HF Link |
| HuatuoGPT-3-7B-Pangu | 7B medical LLM trained with SeedRL | openPangu-Embedded-7B | HF Link |
FreedomIntelligence/openPangu-Embedded-7B.trust_remote_code=True in Transformers, and --trust_remote_code when serving with vLLM.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "FreedomIntelligence/HuatuoGPT-3-7B-Pangu"
4
5tokenizer = AutoTokenizer.from_pretrained(
6 model_name,
7 use_fast=False,
8 trust_remote_code=True
9)
10model = AutoModelForCausalLM.from_pretrained(
11 model_name,
12 trust_remote_code=True,
13 torch_dtype="auto",
14 device_map="auto"
15)
16
17messages = [
18 {"role": "user", "content": "What are the common causes of chest pain?"}
19]
20
21text = tokenizer.apply_chat_template(
22 messages,
23 tokenize=False,
24 add_generation_prompt=True
25)
26
27inputs = tokenizer([text], return_tensors="pt").to(model.device)
28outputs = model.generate(
29 **inputs,
30 max_new_tokens=4096,
31 eos_token_id=45892,
32 return_dict_in_generate=True
33)
34
35input_length = inputs.input_ids.shape[1]
36generated_tokens = outputs.sequences[:, input_length:]
37output_text = tokenizer.decode(generated_tokens[0])
38
39thinking_content = output_text.split("[unused17]")[0].split("[unused16]")[-1].strip()
40content = output_text.split("[unused17]")[-1].split("[unused10]")[0].strip()
41
42print("thinking content:", thinking_content)
43print("content:", content)--trust_remote_code:1CUDA_VISIBLE_DEVICES=0 \
2vllm serve FreedomIntelligence/HuatuoGPT-3-7B-Pangu \
3 --served-model-name HuatuoGPT-3-7B-Pangu \
4 --trust_remote_code \
5 --port 80001CUDA_VISIBLE_DEVICES=0 \
2python -m vllm.entrypoints.openai.api_server \
3 --model FreedomIntelligence/HuatuoGPT-3-7B-Pangu \
4 --served-model-name HuatuoGPT-3-7B-Pangu \
5 --trust_remote_code \
6 --port 80001@article{huatuogpt3,
2 title={HuatuoGPT-3: RL-Only Domain Adaptation from Base Models via Off-Policy Seeding},
3 author={Coming soon},
4 journal={arXiv preprint},
5 year={2026}
6}