Downloads · 30 days
0
gbalachandhiran/gpt-oss-psychologist
gpt-oss-psychologist is a text generation model from gbalachandhiran. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Delete that section and replace it with your custom Unsloth code.
Downloads · 30 days
0
Access
Public
Updated Oct 23, 2025
Repo size
43.8 MB
Likes
0
Public
Click a slice to open those files.
.json27.9 MB · 64%
From the Hugging Face model README
Delete that section and replace it with your custom Unsloth code.
Here’s a formatted example you can copy directly:
## 🧠 Example: Inference with Unsloth FastLanguageModel
You can run this model using [Unsloth](https://github.com/unslothai/unsloth) for optimized 4-bit inference:
# Uploaded model
- **Developed by:** gbalachandhiran
- **License:** apache-2.0
- **Finetuned from model :** unsloth/gpt-oss-20b-unsloth-bnb-4bit
This gpt_oss model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
```python
from unsloth import FastLanguageModel
from transformers import TextStreamer
from huggingface_hub import login
# Optional: login if your model is private
# login("YOUR_HF_TOKEN")
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "gbalachandhiran/oss_psychologist_merged_model_4bit",
max_seq_length = 2048,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model) # Enable inference mode
messages = [
{
"role": "user",
"content": "Can you help me with insomnia?"
}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=False,
return_tensors="pt",
return_dict=True,
reasoning_effort="medium"
).to("cuda")
text_streamer = TextStreamer(tokenizer, skip_prompt=True)
print("Psychologist AI:")
outputs = model.generate(
**inputs,
max_new_tokens=150,
temperature=0.9,
top_p=0.99,
streamer=text_streamer,
do_sample=False,
)