Phronetic Reasoning Models
Collection
The suite of reasoning models released by Phronetic AI • 4 items • Updated
How to use phronetic-ai/RZN-Med with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="phronetic-ai/RZN-Med")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("phronetic-ai/RZN-Med")
model = AutoModelForCausalLM.from_pretrained("phronetic-ai/RZN-Med")
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]:]))How to use phronetic-ai/RZN-Med with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "phronetic-ai/RZN-Med"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "phronetic-ai/RZN-Med",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/phronetic-ai/RZN-Med
How to use phronetic-ai/RZN-Med with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "phronetic-ai/RZN-Med" \
--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": "phronetic-ai/RZN-Med",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "phronetic-ai/RZN-Med" \
--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": "phronetic-ai/RZN-Med",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use phronetic-ai/RZN-Med with Docker Model Runner:
docker model run hf.co/phronetic-ai/RZN-Med
medRZN is a causal language model created for medical reasoning on open-ended questions.
⚠️ For research and educational purposes only — not for clinical use.
This model is not a substitute for professional medical advice, diagnosis, or treatment. Do not use it to make clinical decisions. Always consult a licensed clinician
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("phronetic-ai/medRZN")
model = AutoModelForCausalLM.from_pretrained("phronetic-ai/medRZN")
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
modelName = "phronetic-ai/medRZN"
model = AutoModelForCausalLM.from_pretrained(
modelName,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(modelName)
prompt = "A 45-year-old presents with chest pain. What are possible differentials?"
messages = [
{"role": "system", "content": "You are medRZN, a medical reasoning assistant. This is not medical advice."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
modelInputs = tokenizer([text], return_tensors="pt").to(model.device)
generatedIds = model.generate(
**modelInputs,
max_new_tokens=256
)
generatedIds = [
outputIds[len(inputIds):] for inputIds, outputIds in zip(modelInputs.input_ids, generatedIds)
]
response = tokenizer.batch_decode(generatedIds, skip_special_tokens=True)[0]
print(response)