Run this model with HF Jobs

Run khazarai/Med-R1-14B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/khazarai/Med-R1-14B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/khazarai/Med-R1-14B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/khazarai/Med-R1-14B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/khazarai/Med-R1-14B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Model Description

  • Developed by: khazarai
  • License: apache-2.0
  • Finetuned from model : unsloth/qwen3-14b-unsloth-bnb-4bit

This qwen3 model was trained 2x faster with Unsloth

This model is a QLoRA fine-tuned version of unsloth/qwen3-14b-unsloth-bnb-4bit, originally based on the Qwen3-14B architecture developed by the Qwen Team. The model has been fine-tuned on the Chain of Thought – Heartbreak & Breakups Dataset (MIT Licensed), consisting of 9.8k high-quality Q&A pairs focused on emotional processing, coping strategies, and relationship dynamics following breakups. The goal of this fine-tuning is to enhance:

  • Emotional reasoning capability
  • Structured chain-of-thought generation
  • Empathetic and psychologically grounded responses
  • Relationship pattern analysis
  • Identity reconstruction & self-esteem rebuilding guidance

🧠 Base Model

  • Base architecture: Qwen3-14B
  • Variant: unsloth/qwen3-14b-unsloth-bnb-4bit
  • Quantization: 4-bit (bitsandbytes)
  • Fine-tuning method: QLoRA
  • Adapter type: LoRA
  • Training precision: 4-bit base + 16-bit adapters

🎯 Intended Use

This model is intended for:

  • Mental health–adjacent AI assistants
  • Relationship guidance systems
  • Emotional reasoning research
  • Chain-of-thought alignment experiments
  • NLP research on structured reasoning in affective domains

The model aims to produce:

  • Step-by-step reasoning
  • Balanced perspectives
  • Reduced reactive or extreme advice

⚠️ Limitations

  • Not a substitute for licensed therapy
  • May generate plausible but non-clinically validated advice
  • Trained on synthetic / curated emotional scenarios
  • Chain-of-thought exposure may increase verbosity
  • Emotional nuance outside breakup domain may be limited

This model should not be used for crisis intervention or high-risk mental health scenarios.

How to get started with Model

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel


tokenizer = AutoTokenizer.from_pretrained("unsloth/qwen3-14b-unsloth-bnb-4bit")
base_model = AutoModelForCausalLM.from_pretrained(
    "unsloth/qwen3-14b-unsloth-bnb-4bit",
    device_map={"": 0}
)

model = PeftModel.from_pretrained(base_model,"khazarai/Med-R1-14B")

question = """
How can someone work through and move past deeply painful memories associated with trauma, understanding that "moving past" doesn't mean forgetting but rather integrating the experience in a healthy way?
"""

messages = [
    {"role" : "user", "content" : question}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize = False,
    add_generation_prompt = True,
    enable_thinking = True,
)

from transformers import TextStreamer
_ = model.generate(
    **tokenizer(text, return_tensors = "pt").to("cuda"),
    max_new_tokens = 2048,
    temperature = 0.6,
    top_p = 0.95,
    top_k = 20,
    streamer = TextStreamer(tokenizer, skip_prompt = True),
)

🧪 Future Work

  • Domain expansion to broader emotional intelligence tasks
  • Controlled reasoning output (hidden CoT vs visible CoT)
  • Evaluation via human annotation
  • Cross-cultural emotional adaptation
Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including khazarai/Med-R1-14B