--- base_model: unsloth/gpt-oss-20b-unsloth-bnb-4bit library_name: peft tags: - base_model:adapter:unsloth/gpt-oss-20b-unsloth-bnb-4bit - lora - sft - transformers - trl - unsloth --- # GPT-OSS-20B Empathetic (LoRA Fine-tuned) This model is a **LoRA fine-tuned adapter** built on top of [unsloth/gpt-oss-20b-unsloth-bnb-4bit](https://huggingface.co/unsloth/gpt-oss-20b-unsloth-bnb-4bit). It specializes in generating **empathetic and supportive responses**, making it suitable for conversational AI use cases where emotional awareness is important. ## Model Details ### Model Description - **Developed by:** Anwesha026 - **Shared by:** Anwesha026 - **Model type:** Decoder-only Causal LM (LoRA adapter) - **Language(s):** English - **License:** Apache-2.0 - **Finetuned from model [optional]:** unsloth/gpt-oss-20b-unsloth-bnb-4bit ### Model Sources - **Repository:** [Anwesha026/fine-tuned-gpt-oss-20b](https://huggingface.co/Anwesha026/fine-tuned-gpt-oss-20b) - **Base Model:** [unsloth/gpt-oss-20b-unsloth-bnb-4bit](https://huggingface.co/unsloth gpt-oss-20b-unsloth-bnb-4bit) ## Uses ### Direct Use - Empathetic chatbots - Companion-like conversational assistants - Research in affective computing and emotionally aware dialogue ### Downstream Use - Integration into mental health support tools (with **human supervision**) - Conversational agents requiring emotionally supportive responses ### Out-of-Scope Use - Providing professional medical or psychological advice - Factual Q&A where high accuracy is required - Malicious or manipulative applications --- ## Bias, Risks, and Limitations Like most LLMs, this model may: - Produce biased, stereotypical, or culturally insensitive outputs - Over-generalize empathetic responses - Hallucinate factual details - Fail in high-stakes or sensitive psychological contexts ### Recommendations - Always keep a **human in the loop** when deploying in sensitive domains - Do not use as a replacement for professional medical/psychological help - Carefully evaluate outputs before real-world use --- ## How to Get Started with the Model Use the code below to get started with the model. ```python from transformers import AutoTokenizer, AutoModelForCausalLM import torch ``` ``` model_id = "Anwesha026/fine-tuned-gpt-oss-20b" ``` ``` tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16) inputs = tokenizer("I feel really lonely lately.", return_tensors="pt").to(model.device) outputs = model.generate(**inputs, max_new_tokens=100) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` ## Training Details ### Training Data **Dataset:** [facebook/empathetic_dialogues](https://huggingface.co/datasets/facebook/empathetic_dialogues) ### Training Procedure #### Training Hyperparameters - Batch size (per device): 1 - Gradient accumulation steps: 4 → effective batch size = 1 × 4 = 4 - Learning rate: 1e-4 - Optimizer: AdamW (8-bit) - Weight decay: 0.01 - Learning rate scheduler: Linear - Warmup steps: 10 - Max training steps: 300 - Seed: 3407 ## Evaluation ### Results - Improved empathetic alignment compared to the base model - Some generic/repetitive answers persist ## Technical Specifications ### Model Architecture and Objective - Base model: GPT-OSS-20B (decoder-only transformer, 20B parameters) - Fine-tuning method: LoRA adapters via PEFT ### Compute Infrastructure #### Hardware - NVIDIA GPU #### Software - Hugging Face Transformers, PEFT, TRL, Unsloth ## Model Card Authors - Anwesha026 ## Model Card Contact - Hugging Face:[@Anwesha026](https://huggingface.co/Anwesha026) ### Framework versions - Transformers: 4.x - PEFT: 0.17.1 - TRL: latest - Unsloth: latest