diff --git a/README.md b/README.md index c1d979c3..0010db16 100644 --- a/README.md +++ b/README.md @@ -28,23 +28,32 @@ All reported numbers are produced with the same pipeline to ensure that the numb Phi-3-mini, a 3.8B language model is available on [Microsoft Azure AI Studio](https://aka.ms/phi3-azure-ai), [Hugging Face](https://huggingface.co/collections/microsoft/phi-3-6626e15e9585a200d2d761e3), and [Ollama](https://ollama.com/library/phi3). +![phi3modelminibenchmark](/imgs/00/phi3minibenchmark.png) + +![phi3modelminibenchmark128k](/imgs/00/phi3minibenchmark128.png) + ### Phi-3-small Phi-3-small with only 7B parameters beats GPT-3.5T across a variety of language, reasoning, coding, and math benchmarks. -![phimodelsmall](/imgs/00/phi3small.png) +![phi3modelsmall](/imgs/00/phi3smallbenchmark.png) + +![phi3modelsmall128k](/imgs/00/phi3smallbenchmark128.png) -### Phi-3-midium + +### Phi-3-medium Phi-3-medium with 14B parameters continues the trend and outperforms Gemini 1.0 Pro. -![phimodelmedium](/imgs/00/phi3medium.png) +![phi3modelmedium](/imgs/00/phi3mediumbenchmark.png) + +![phi3modelmedium128k](/imgs/00/phi3mediumbenchmark128.png) ### Phi-3-vision Phi-3-vision with just 4.2B parameters continues that trend and outperforms larger models such as Claude-3 Haiku and Gemini 1.0 Pro V across general visual reasoning tasks, OCR, table and chart understanding tasks. -![phimodelvision](/imgs/00/phi3vision.png) +![phi3modelvision](/imgs/00/phi3visionbenchmark.png) > **Note** > diff --git a/imgs/00/phi3mediumbenchmark.png b/imgs/00/phi3mediumbenchmark.png new file mode 100644 index 00000000..397b44e0 Binary files /dev/null and b/imgs/00/phi3mediumbenchmark.png differ diff --git a/imgs/00/phi3mediumbenchmark128.png b/imgs/00/phi3mediumbenchmark128.png new file mode 100644 index 00000000..5af6fc36 Binary files /dev/null and b/imgs/00/phi3mediumbenchmark128.png differ diff --git a/imgs/00/phi3minibenchmark.png b/imgs/00/phi3minibenchmark.png new file mode 100644 index 00000000..918f5cf8 Binary files /dev/null and b/imgs/00/phi3minibenchmark.png differ diff --git a/imgs/00/phi3minibenchmark128.png b/imgs/00/phi3minibenchmark128.png new file mode 100644 index 00000000..729fd56f Binary files /dev/null and b/imgs/00/phi3minibenchmark128.png differ diff --git a/imgs/00/phi3smallbenchmark.png b/imgs/00/phi3smallbenchmark.png new file mode 100644 index 00000000..d3f15e8b Binary files /dev/null and b/imgs/00/phi3smallbenchmark.png differ diff --git a/imgs/00/phi3smallbenchmark128.png b/imgs/00/phi3smallbenchmark128.png new file mode 100644 index 00000000..a6d3caa8 Binary files /dev/null and b/imgs/00/phi3smallbenchmark128.png differ diff --git a/imgs/00/phi3visionbenchmark.png b/imgs/00/phi3visionbenchmark.png new file mode 100644 index 00000000..2afd8684 Binary files /dev/null and b/imgs/00/phi3visionbenchmark.png differ diff --git a/md/01.Introduce/AISafety.md b/md/01.Introduce/AISafety.md index 8af35ddc..8fcb8f2f 100644 --- a/md/01.Introduce/AISafety.md +++ b/md/01.Introduce/AISafety.md @@ -16,14 +16,30 @@ Information Reliability: Language models can generate nonsensical content or fab 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.). -Important areas for consideration for using LLM and SLMs include: +## Responsible AI Considerations -- **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. -- **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. -- **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). -- **Generation of Harmful Content:** Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case. -- **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. -- **Identification of individuals:** models with vision capabilities may have the potential to uniquely identify individuals in images. Safety post-training steers the model to refuse such requests, but developers should consider and implement, as appropriate, additional mitigations or user consent flows as required in their respective jurisdiction, (e.g., building measures to blur faces in image inputs before processing). +Like other language models, the Phi series models can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include: + +**Quality of Service:** the Phi models are 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. + +**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. + +**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. +Information Reliability: Language models can generate nonsensical content or fabricate content that might sound reasonable but is inaccurate or outdated. + +**Limited Scope for Code:** Majority of Phi-3 training data is based in Python and use 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. + +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.). Important areas for consideration include: + +**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. + +**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. + +**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). + +**Generation of Harmful Content:** Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case. + +**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. ### Finetuning and AI Content Safety After fine-tuning a model, we highly recommend leveraging [Azure AI Content Safety](https://learn.microsoft.com/azure/ai-services/content-safety/overview) measures to monitor the content generated by the models, identify and block potential risks, threats, and quality issues. @@ -44,4 +60,4 @@ Azure AI Content Safety is not a one-size-fits-all solution; it can be customize Azure AI Content Safety service detects harmful user-generated and AI-generated content in applications and services. It includes text and image APIs that allow you to detect harmful or inappropriate material. -[AI Content Safety Playlist](https://www.youtube.com/playlist?list=PLlrxD0HtieHjaQ9bJjyp1T7FeCbmVcPkQ) +[AI Content Safety Playlist](https://www.youtube.com/playlist?list=PLlrxD0HtieHjaQ9bJjyp1T7FeCbmVcPkQ) \ No newline at end of file