Triangle104 commited on
Commit
ae9db16
Β·
verified Β·
1 Parent(s): 1d44737

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +108 -0
README.md CHANGED
@@ -19,6 +19,114 @@ tags:
19
  This model was converted to GGUF format from [`prithivMLmods/Phi-4-Empathetic`](https://huggingface.co/prithivMLmods/Phi-4-Empathetic) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
20
  Refer to the [original model card](https://huggingface.co/prithivMLmods/Phi-4-Empathetic) for more details on the model.
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ## Use with llama.cpp
23
  Install llama.cpp through brew (works on Mac and Linux)
24
 
 
19
  This model was converted to GGUF format from [`prithivMLmods/Phi-4-Empathetic`](https://huggingface.co/prithivMLmods/Phi-4-Empathetic) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
20
  Refer to the [original model card](https://huggingface.co/prithivMLmods/Phi-4-Empathetic) for more details on the model.
21
 
22
+ ---
23
+ Model details:
24
+ -
25
+ [Phi-4 Empathetic finetuned] from Microsoft's Phi-4 is an advanced open model built upon a blend of high-quality synthetic datasets, data from filtered public domain websites, and carefully selected academic resources. It excels at responsible human-like reasoning, empathetic dialogue, and emotional thought generation. The model is designed to engage in nuanced, thoughtful conversations, with outputs that can include special characters and emojis for expressive communication. 🌟
26
+
27
+ Phi-4 Empathetic employs a sophisticated safety post-training approach, leveraging both open-source and proprietary datasets. Safety alignment is achieved using a combination of SFT (Supervised Fine-Tuning) and DPO (Direct Preference Optimization), targeting responsible interaction and emotional awareness in diverse contexts.
28
+ Dataset Info
29
+
30
+ Phi-4 Empathetic is fine-tuned on a carefully curated dataset tailored for empathetic and responsible reasoning tasks. The dataset incorporates the Chain of Thought (CoT) methodology, emphasizing logical reasoning, emotional nuance, and step-by-step thought processes. Additionally, it includes data optimized for generating responses that resonate with human emotions, making it ideal for:
31
+
32
+ Emotional Support Applications πŸ€—
33
+ Responsible Conversations πŸ’¬
34
+ Thoughtful Problem-Solving 🧠
35
+
36
+ Run with Transformers
37
+
38
+ # pip install accelerate
39
+ from transformers import AutoTokenizer, AutoModelForCausalLM
40
+ import torch
41
+
42
+ tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Phi-4-Empathetic")
43
+ model = AutoModelForCausalLM.from_pretrained(
44
+ "prithivMLmods/Phi-4-Empathetic",
45
+ device_map="auto",
46
+ torch_dtype=torch.bfloat16,
47
+ )
48
+
49
+ input_text = "Can you share some words of encouragement for someone feeling down?"
50
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
51
+
52
+ outputs = model.generate(**input_ids, max_new_tokens=32)
53
+ print(tokenizer.decode(outputs[0]))
54
+
55
+ You can ensure correct formatting for empathetic dialogue by using tokenizer.apply_chat_template as follows:
56
+
57
+ messages = [
58
+ {"role": "user", "content": "Can you share some words of encouragement for someone feeling down?"},
59
+ ]
60
+ input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
61
+
62
+ outputs = model.generate(**input_ids, max_new_tokens=256)
63
+ print(tokenizer.decode(outputs[0]))
64
+
65
+ Intended Use
66
+
67
+ The Phi-4 Empathetic model is optimized for applications that require thoughtful and emotionally aware interactions. Below are some suggested use cases:
68
+
69
+ Emotional Support & Counseling πŸ’–
70
+ Providing thoughtful responses to users seeking emotional encouragement or advice.
71
+ Generating empathetic messages for mental health and well-being applications.
72
+
73
+ Responsible Dialogue Generation πŸ—£οΈ
74
+ Engaging in nuanced conversations with a focus on fairness, safety, and ethical considerations.
75
+ Ensuring that interactions remain respectful and aligned with safety guidelines.
76
+
77
+ Creative Writing Assistance ✍️
78
+ Helping users craft emotionally engaging content, including stories, poems, and personal messages.
79
+ Assisting in generating content enriched with special characters and emojis for expressive communication.
80
+
81
+ Educational Tools πŸŽ“
82
+ Offering step-by-step explanations with an empathetic tone for better understanding.
83
+ Generating thoughtful Q&A responses for various subjects.
84
+
85
+ Customer Support 🀝
86
+ Automating empathetic responses to customer queries.
87
+ Handling emotionally sensitive customer service interactions with care.
88
+
89
+ Social Media Engagement πŸ“±
90
+ Generating creative, engaging, and emotionally resonant posts for social media platforms.
91
+ Providing personalized message suggestions enriched with emojis and special characters.
92
+
93
+ Limitations
94
+
95
+ While Phi-4 Empathetic is highly capable, it has certain limitations users should be aware of:
96
+
97
+ Bias and Fairness:
98
+ Despite extensive safety alignment, biases may still emerge in the model’s responses. Users should exercise discretion, particularly in sensitive contexts.
99
+
100
+ Emotional Nuance:
101
+ The model may occasionally misinterpret the emotional tone of a prompt, leading to less relevant or inappropriate responses.
102
+
103
+ Real-Time Knowledge:
104
+ The model's knowledge is based on the data it was trained on and does not include real-time or post-training updates. It may not reflect recent events or changes in knowledge.
105
+
106
+ Safety and Harmlessness:
107
+ Although the model is aligned with safety standards, there may still be cases where outputs require human oversight to ensure appropriateness.
108
+
109
+ Resource Requirements:
110
+ Running the model efficiently may require significant computational resources, especially in large-scale or real-time applications.
111
+
112
+ Ethical Considerations:
113
+ The model must be used responsibly, avoiding any malicious applications such as generating harmful content or spreading misinformation.
114
+
115
+ Domain-Specific Limitations:
116
+ While it performs well in general-purpose tasks, it may need further fine-tuning for highly specialized domains, such as legal, medical, or financial applications.
117
+
118
+ Special Features
119
+
120
+ Emojis & Special Characters πŸŽ‰πŸ’‘
121
+ The model can generate responses with emojis and special characters for expressive communication, making it ideal for social media and personal messaging applications.
122
+
123
+ Human-Like Reasoning 🧠
124
+ Fine-tuned for responsible reasoning and empathetic dialogue, it excels at generating thoughtful and human-like responses.
125
+
126
+ Advanced Safety Alignment πŸ”’
127
+ The model employs iterative SFT and DPO techniques to ensure that its outputs are helpful, harmless, and aligned with ethical standards.
128
+
129
+ ---
130
  ## Use with llama.cpp
131
  Install llama.cpp through brew (works on Mac and Linux)
132