askalgore commited on
Commit
ff71003
·
verified ·
1 Parent(s): 05e41ae

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +175 -127
README.md CHANGED
@@ -1,199 +1,247 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  library_name: transformers
3
- tags: []
4
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
 
 
 
9
 
 
10
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
 
 
 
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
40
- ### Direct Use
 
 
 
 
 
 
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
 
45
 
46
- ### Downstream Use [optional]
 
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
 
 
 
49
 
50
- [More Information Needed]
 
 
 
 
 
 
 
 
 
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
 
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
- ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
73
 
74
- [More Information Needed]
75
 
76
- ## Training Details
77
 
78
- ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
 
82
- [More Information Needed]
83
 
84
- ### Training Procedure
85
 
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
 
88
- #### Preprocessing [optional]
89
 
90
- [More Information Needed]
91
 
 
92
 
93
- #### Training Hyperparameters
94
 
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
 
97
- #### Speeds, Sizes, Times [optional]
98
 
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
 
101
- [More Information Needed]
102
 
103
- ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
 
107
- ### Testing Data, Factors & Metrics
108
 
109
- #### Testing Data
110
 
111
- <!-- This should link to a Dataset Card if possible. -->
112
 
113
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
- #### Factors
 
 
 
 
 
 
 
 
 
116
 
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
 
119
- [More Information Needed]
120
 
121
- #### Metrics
122
 
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
 
125
- [More Information Needed]
126
 
127
- ### Results
128
 
129
- [More Information Needed]
130
 
131
- #### Summary
132
 
 
133
 
 
134
 
135
- ## Model Examination [optional]
136
 
137
- <!-- Relevant interpretability work for the model goes here -->
138
 
139
- [More Information Needed]
140
 
141
- ## Environmental Impact
142
 
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
 
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
+ license: mit
3
+ license_link: https://huggingface.co/microsoft/Phi-4-reasoning/resolve/main/LICENSE
4
+ language:
5
+ - en
6
+ base_model:
7
+ - microsoft/phi-4
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - phi
11
+ - nlp
12
+ - math
13
+ - code
14
+ - chat
15
+ - conversational
16
+ - reasoning
17
+ - heretic
18
+ - uncensored
19
+ - decensored
20
+ - abliterated
21
+ inference:
22
+ parameters:
23
+ temperature: 0
24
+ widget:
25
+ - messages:
26
+ - role: user
27
+ content: What is the derivative of x^2?
28
  library_name: transformers
 
29
  ---
30
+ # This is a decensored version of [microsoft/Phi-4-reasoning](https://huggingface.co/microsoft/Phi-4-reasoning), made using [Heretic](https://github.com/p-e-w/heretic) v1.1.0
31
+
32
+ ## Abliteration parameters
33
+
34
+ | Parameter | Value |
35
+ | :-------- | :---: |
36
+ | **direction_index** | 17.38 |
37
+ | **attn.o_proj.max_weight** | 1.50 |
38
+ | **attn.o_proj.max_weight_position** | 27.13 |
39
+ | **attn.o_proj.min_weight** | 1.40 |
40
+ | **attn.o_proj.min_weight_distance** | 15.82 |
41
+ | **mlp.down_proj.max_weight** | 1.43 |
42
+ | **mlp.down_proj.max_weight_position** | 24.75 |
43
+ | **mlp.down_proj.min_weight** | 1.23 |
44
+ | **mlp.down_proj.min_weight_distance** | 10.37 |
45
 
46
+ ## Performance
47
 
48
+ | Metric | This model | Original model ([microsoft/Phi-4-reasoning](https://huggingface.co/microsoft/Phi-4-reasoning)) |
49
+ | :----- | :--------: | :---------------------------: |
50
+ | **KL divergence** | 0.0050 | 0 *(by definition)* |
51
+ | **Refusals** | 46/100 | 67/100 |
52
 
53
+ -----
54
 
55
 
56
+ # Phi-4-reasoning Model Card
57
 
58
+ [Phi-4-reasoning Technical Report](https://huggingface.co/papers/2504.21318)
59
 
60
+ ## Model Summary
61
 
62
+ | | |
63
+ |-------------------------|-------------------------------------------------------------------------------|
64
+ | **Developers** | Microsoft Research |
65
+ | **Description** | Phi-4-reasoning is a state-of-the-art open-weight reasoning model finetuned from Phi-4 using supervised fine-tuning on a dataset of chain-of-thought traces and reinforcement learning. The supervised fine-tuning dataset includes a blend of synthetic prompts and high-quality filtered data from public domain websites, focused on math, science, and coding skills as well as alignment data for safety and Responsible AI. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning. |
66
+ | **Architecture** | Base model same as previously released Phi-4, 14B parameters, dense decoder-only Transformer model |
67
+ | **Inputs** | Text, best suited for prompts in the chat format |
68
+ | **Context length** | 32k tokens |
69
+ | **GPUs** | 32 H100-80G |
70
+ | **Training time** | 2.5 days |
71
+ | **Training data** | 16B tokens, ~8.3B unique tokens |
72
+ | **Outputs** | Generated text in response to the input. Model responses have two sections, namely, a reasoning chain-of-thought block followed by a summarization block |
73
+ | **Dates** | January 2025 – April 2025 |
74
+ | **Status** | Static model trained on an offline dataset with cutoff dates of March 2025 and earlier for publicly available data |
75
+ | **Release date** | April 30, 2025 |
76
+ | **License** | MIT |
77
 
78
+ ## Intended Use
 
 
 
 
 
 
79
 
80
+ | | |
81
+ |-------------------------------|-------------------------------------------------------------------------|
82
+ | **Primary Use Cases** | Our model is designed to accelerate research on language models, for use as a building block for generative AI powered features. It provides uses for general purpose AI systems and applications (primarily in English) which require:<br><br>1. Memory/compute constrained environments.<br>2. Latency bound scenarios.<br>3. Reasoning and logic. |
83
+ | **Out-of-Scope Use Cases** | This model is designed and tested for math reasoning only. Our models are not specifically designed or evaluated for all downstream purposes. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios. Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case, including the model’s focus on English. Review the Responsible AI Considerations section below for further guidance when choosing a use case. Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under. |
84
 
85
+ ## Usage
86
 
87
+ > [!IMPORTANT]
88
+ > To fully take advantage of the model's capabilities, inference must use `temperature=0.8`, `top_k=50`, `top_p=0.95`, and `do_sample=True`. For more complex queries, set `max_new_tokens=32768` to allow for longer chain-of-thought (CoT).
 
89
 
90
+ ### Input Formats
91
 
92
+ Given the nature of the training data, **always use** ChatML template with the **following system prompt** for inference:
93
 
94
+ ```bash
95
+ <|im_start|>system<|im_sep|>
96
+ You are Phi, a language model trained by Microsoft to help users. Your role as an assistant involves thoroughly exploring questions through a systematic thinking process before providing the final precise and accurate solutions. This requires engaging in a comprehensive cycle of analysis, summarizing, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. Please structure your response into two main sections: Thought and Solution using the specified format: <think> {Thought section} </think> {Solution section}. In the Thought section, detail your reasoning process in steps. Each step should include detailed considerations such as analysing questions, summarizing relevant findings, brainstorming new ideas, verifying the accuracy of the current steps, refining any errors, and revisiting previous steps. In the Solution section, based on various attempts, explorations, and reflections from the Thought section, systematically present the final solution that you deem correct. The Solution section should be logical, accurate, and concise and detail necessary steps needed to reach the conclusion. Now, try to solve the following question through the above guidelines:<|im_end|>
97
+ <|im_start|>user<|im_sep|>
98
+ What is the derivative of x^2?<|im_end|>
99
+ <|im_start|>assistant<|im_sep|>
100
+ ```
101
 
102
+ ### With `transformers`
103
 
104
+ ```python
105
+ from transformers import AutoTokenizer, AutoModelForCausalLM
106
 
107
+ tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-4-reasoning")
108
+ model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-4-reasoning", device_map="auto", torch_dtype="auto")
109
 
110
+ messages = [
111
+ {"role": "system", "content": "You are Phi, a language model trained by Microsoft to help users. Your role as an assistant involves thoroughly exploring questions through a systematic thinking process before providing the final precise and accurate solutions. This requires engaging in a comprehensive cycle of analysis, summarizing, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. Please structure your response into two main sections: Thought and Solution using the specified format: <think> {Thought section} </think> {Solution section}. In the Thought section, detail your reasoning process in steps. Each step should include detailed considerations such as analysing questions, summarizing relevant findings, brainstorming new ideas, verifying the accuracy of the current steps, refining any errors, and revisiting previous steps. In the Solution section, based on various attempts, explorations, and reflections from the Thought section, systematically present the final solution that you deem correct. The Solution section should be logical, accurate, and concise and detail necessary steps needed to reach the conclusion. Now, try to solve the following question through the above guidelines:"},
112
+ {"role": "user", "content": "What is the derivative of x^2?"},
113
+ ]
114
+ inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
115
 
116
+ outputs = model.generate(
117
+ inputs.to(model.device),
118
+ max_new_tokens=4096,
119
+ temperature=0.8,
120
+ top_k=50,
121
+ top_p=0.95,
122
+ do_sample=True,
123
+ )
124
+ print(tokenizer.decode(outputs[0]))
125
+ ```
126
 
127
+ ### With `vllm`
128
 
129
+ ```bash
130
+ vllm serve microsoft/Phi-4-reasoning --enable-reasoning --reasoning-parser deepseek_r1
131
+ ```
132
 
133
+ *Phi-4-reasoning is also supported out-of-the-box by Ollama, llama.cpp, and any Phi-4 compatible framework.*
134
 
135
+ ## Data Overview
136
 
137
+ ### Training Datasets
138
 
139
+ Our training data is a mixture of Q&A, chat format data in math, science, and coding. The chat prompts are sourced from filtered high-quality web data and optionally rewritten and processed through a synthetic data generation pipeline. We further include data to improve truthfulness and safety.
140
 
141
+ ### Benchmark Datasets
142
 
143
+ We evaluated Phi-4-reasoning using the open-source [Eureka](https://github.com/microsoft/eureka-ml-insights) evaluation suite and our own internal benchmarks to understand the model's capabilities. More specifically, we evaluate our model on:
144
 
145
+ Reasoning tasks:
146
 
147
+ * **AIME 2025, 2024, 2023, and 2022:** Math olympiad questions.
148
 
149
+ * **GPQA-Diamond:** Complex, graduate-level science questions.
150
 
151
+ * **OmniMath:** Collection of over 4000 olympiad-level math problems with human annotation.
152
 
153
+ * **LiveCodeBench:** Code generation benchmark gathered from competitive coding contests.
154
 
155
+ * **3SAT (3-literal Satisfiability Problem) and TSP (Traveling Salesman Problem):** Algorithmic problem solving.
156
 
157
+ * **BA Calendar:** Planning.
158
 
159
+ * **Maze and SpatialMap:** Spatial understanding.
160
 
161
+ General-purpose benchmarks:
162
 
163
+ * **Kitab:** Information retrieval.
164
 
165
+ * **IFEval and ArenaHard:** Instruction following.
166
 
167
+ * **PhiBench:** Internal benchmark.
168
 
169
+ * **FlenQA:** Impact of prompt length on model performance.
170
 
171
+ * **HumanEvalPlus:** Functional code generation.
172
 
173
+ * **MMLU-Pro:** Popular aggregated dataset for multitask language understanding.
174
 
175
+ ## Safety
176
 
177
+ ### Approach
178
 
179
+ Phi-4-reasoning has adopted a robust safety post-training approach via supervised fine-tuning (SFT). This approach leverages a variety of both open-source and in-house generated synthetic prompts, with LLM-generated responses that adhere to rigorous Microsoft safety guidelines, e.g., User Understanding and Clarity, Security and Ethical Guidelines, Limitations, Disclaimers and Knowledge Scope, Handling Complex and Sensitive Topics, Safety and Respectful Engagement, Confidentiality of Guidelines and Confidentiality of Chain-of-Thoughts.
180
 
181
+ ### Safety Evaluation and Red-Teaming
182
 
183
+ Prior to release, Phi-4-reasoning followed a multi-faceted evaluation approach. Quantitative evaluation was conducted with multiple open-source safety benchmarks and in-house tools utilizing adversarial conversation simulation. For qualitative safety evaluation, we collaborated with the independent AI Red Team (AIRT) at Microsoft to assess safety risks posed by Phi-4-reasoning in both average and adversarial user scenarios. In the average user scenario, AIRT emulated typical single-turn and multi-turn interactions to identify potentially risky behaviors. The adversarial user scenario tested a wide range of techniques aimed at intentionally subverting the model's safety training including grounded-ness, jailbreaks, harmful content like hate and unfairness, violence, sexual content, or self-harm, and copyright violations for protected material. We further evaluate models on Toxigen, a benchmark designed to measure bias and toxicity targeted towards minority groups.
184
 
185
+ Please refer to the technical report for more details on safety alignment.
186
 
187
+ ## Model Quality
188
 
189
+ At the high-level overview of the model quality on representative benchmarks. For the tables below, higher numbers indicate better performance:
190
 
191
+ | | AIME 24 | AIME 25 | OmniMath | GPQA-D | LiveCodeBench (8/1/24–2/1/25) |
192
+ |-----------------------------|-------------|-------------|-------------|------------|-------------------------------|
193
+ | Phi-4-reasoning | 75.3 | 62.9 | 76.6 | 65.8 | 53.8 |
194
+ | Phi-4-reasoning-plus | 81.3 | 78.0 | 81.9 | 68.9 | 53.1 |
195
+ | OpenThinker2-32B | 58.0 | 58.0 | — | 64.1 | — |
196
+ | QwQ 32B | 79.5 | 65.8 | — | 59.5 | 63.4 |
197
+ | EXAONE-Deep-32B | 72.1 | 65.8 | — | 66.1 | 59.5 |
198
+ | DeepSeek-R1-Distill-70B | 69.3 | 51.5 | 63.4 | 66.2 | 57.5 |
199
+ | DeepSeek-R1 | 78.7 | 70.4 | 85.0 | 73.0 | 62.8 |
200
+ | o1-mini | 63.6 | 54.8 | — | 60.0 | 53.8 |
201
+ | o1 | 74.6 | 75.3 | 67.5 | 76.7 | 71.0 |
202
+ | o3-mini | 88.0 | 78.0 | 74.6 | 77.7 | 69.5 |
203
+ | Claude-3.7-Sonnet | 55.3 | 58.7 | 54.6 | 76.8 | — |
204
+ | Gemini-2.5-Pro | 92.0 | 86.7 | 61.1 | 84.0 | 69.2 |
205
 
206
+ | | Phi-4 | Phi-4-reasoning | Phi-4-reasoning-plus | o3-mini | GPT-4o |
207
+ |----------------------------------------|-------|------------------|-------------------|---------|--------|
208
+ | FlenQA [3K-token subset] | 82.0 | 97.7 | 97.9 | 96.8 | 90.8 |
209
+ | IFEval Strict | 62.3 | 83.4 | 84.9 | 91.5 | 81.8 |
210
+ | ArenaHard | 68.1 | 73.3 | 79.0 | 81.9 | 75.6 |
211
+ | HumanEvalPlus | 83.5 | 92.9 | 92.3 | 94.0| 88.0 |
212
+ | MMLUPro | 71.5 | 74.3 | 76.0 | 79.4 | 73.0 |
213
+ | Kitab<br><small>No Context - Precision<br>With Context - Precision<br>No Context - Recall<br>With Context - Recall</small> | <br>19.3<br>88.5<br>8.2<br>68.1 | <br>23.2<br>91.5<br>4.9<br>74.8 | <br>27.6<br>93.6<br>6.3<br>75.4 | <br>37.9<br>94.0<br>4.2<br>76.1 | <br>53.7<br>84.7<br>20.3<br>69.2 |
214
+ | Toxigen Discriminative<br><small>Toxic category<br>Neutral category</small> | <br>72.6<br>90.0 | <br>86.7<br>84.7 | <br>77.3<br>90.5 | <br>85.4<br>88.7 | <br>87.6<br>85.1 |
215
+ | PhiBench 2.21 | 58.2 | 70.6 | 74.2 | 78.0| 72.4 |
216
 
217
+ Overall, Phi-4-reasoning, with only 14B parameters, performs well across a wide range of reasoning tasks, outperforming significantly larger open-weight models such as DeepSeek-R1 distilled 70B model and approaching the performance levels of full DeepSeek R1 model. We also test the models on multiple new reasoning benchmarks for algorithmic problem solving and planning, including 3SAT, TSP, and BA-Calendar. These new tasks are nominally out-of-domain for the models as the training process did not intentionally target these skills, but the models still show strong generalization to these tasks. Furthermore, when evaluating performance against standard general abilities benchmarks such as instruction following or non-reasoning tasks, we find that our new models improve significantly from Phi-4, despite the post-training being focused on reasoning skills in specific domains.
218
 
219
+ ## Responsible AI Considerations
220
 
221
+ Like other language models, Phi-4-reasoning can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include:
222
 
223
+ * **Quality of Service:** The model is trained primarily on English text. Languages other than English will experience worse performance. English language varieties with less representation in the training data might experience worse performance than standard American English. Phi-4-reasoning is not intended to support multilingual use.
224
 
225
+ * **Representation of Harms & Perpetuation of Stereotypes:** These models can over- or under-represent groups of people, erase representation of some groups, or reinforce demeaning or negative stereotypes. Despite safety post-training, these limitations may still be present due to differing levels of representation of different groups or prevalence of examples of negative stereotypes in training data that reflect real-world patterns and societal biases.
226
 
227
+ * **Inappropriate or Offensive Content:** These models may produce other types of inappropriate or offensive content, which may make it inappropriate to deploy for sensitive contexts without additional mitigations that are specific to the use case.
228
 
229
+ * **Information Reliability:** Language models can generate nonsensical content or fabricate content that might sound reasonable but is inaccurate or outdated.
230
 
231
+ * **Election Information Reliability:** The model has an elevated defect rate when responding to election-critical queries, which may result in incorrect or unauthoritative election critical information being presented. We are working to improve the model's performance in this area. Users should verify information related to elections with the election authority in their region.
232
 
233
+ * **Limited Scope for Code:** Majority of Phi-4-reasoning training data is based in Python and uses common packages such as `typing`, `math`, `random`, `collections`, `datetime`, `itertools`. If the model generates Python scripts that utilize other packages or scripts in other languages, we strongly recommend users manually verify all API uses.
234
 
235
+ Developers should apply responsible AI best practices and are responsible for ensuring that a specific use case complies with relevant laws and regulations (e.g. privacy, trade, etc.). Using safety services like [Azure AI Content Safety](https://azure.microsoft.com/en-us/products/ai-services/ai-content-safety) that have advanced guardrails is highly recommended. Important areas for consideration include:
236
 
237
+ * **Allocation:** Models may not be suitable for scenarios that could have consequential impact on legal status or the allocation of resources or life opportunities (ex: housing, employment, credit, etc.) without further assessments and additional debiasing techniques.
238
 
239
+ * **High-Risk Scenarios:** Developers should assess suitability of using models in high-risk scenarios where unfair, unreliable or offensive outputs might be extremely costly or lead to harm. This includes providing advice in sensitive or expert domains where accuracy and reliability are critical (ex: legal or health advice). Additional safeguards should be implemented at the application level according to the deployment context.
240
 
241
+ * **Misinformation:** Models may produce inaccurate information. Developers should follow transparency best practices and inform end-users they are interacting with an AI system. At the application level, developers can build feedback mechanisms and pipelines to ground responses in use-case specific, contextual information, a technique known as Retrieval Augmented Generation (RAG).
242
 
243
+ * **Generation of Harmful Content:** Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case.
244
 
245
+ * **Misuse:** Other forms of misuse such as fraud, spam, or malware production may be possible, and developers should ensure that their applications do not violate applicable laws and regulations.
246
 
247
+ * **Data Summary:** https://huggingface.co/microsoft/Phi-4-reasoning/blob/main/data_summary_card.md