In short.
Phi-3-Mini-128K-Instruct is an MIT-licensed text-generation model from Microsoft with 3.8 billion parameters. It is for developers and researchers who need a small model that handles long inputs. The performance claims are Microsoft's own, the model is weak on factual recall and on text that is not English, and nothing here was run or tested. The model card describes a dense decoder-only Transformer with a 128K-token context. It was trained on 4.9 trillion tokens with a training data cutoff of October 2023, and released in June 2024 as an update to the original Phi-3-mini. The card reports that the update improved scores on long-context, instruction-following and structured-output benchmarks. It also reports results broadly competitive with larger open models of its time, with a lower score on factual knowledge. The card supplies a CUDA inference example, example package versions and links to separate ONNX builds for CPU and mobile. The card does not give memory requirements, hosted pricing or the full licence text, so the costs of getting and running the model are unknown.
Researched and written by an AI model and checked by a second AI model. How it works
The scope is the complete model card (README) for microsoft/Phi-3-mini-128k-instruct at pinned revision f3c06aed622e14ca0abf5115094e4fc9a9948f36. That includes the licence declaration in its front matter, its License section and its trademark notice. Linked pages and files are excluded: the LICENSE file, the Phi-3 technical report, the data summary card, the sample fine-tuning script, the ONNX and GGUF repositories, the Phi-4 pages, the Cookbook and the Azure pages. The model weights, tokenizer files and any repository code were not inspected, and the effects of the trust_remote_code flag are not verified from this source. Nothing was run or tested, and no benchmark was reproduced. The performance figures are Microsoft's own, as stated in the card. Memory requirements, the costs of getting and running the model, hosted pricing and the full licence text are unknown from this evidence.
The overview
What this resource is
The resource is the Hugging Face model card (README) for microsoft/Phi-3-mini-128k-instruct, read at one pinned revision (f3c06aed622e14ca0abf5115094e4fc9a9948f36). The card describes a 3.8 billion-parameter open language model in Microsoft's Phi-3 family. The Mini size comes in two variants, named for their context length: 4K and 128K tokens. This report covers the 128K variant.
The card's front matter lists the licence as MIT, the language as English, the pipeline as text-generation, and the tags as nlp and code. Phi-3 is a model family. The card mentions other sizes (Small, Medium, Vision) and the newer Phi-4 models only as links, and this report does not assess them.
Overall assessment
On the card's evidence, this is a small open model that Microsoft intends for applications with limited memory or compute and for latency-bound applications. Its 128K-token context is aimed at work with long inputs. The card does not say how its memory use, latency or running costs compare with larger models, so those remain unknown. The card includes a release-notes table comparing the original and June 2024 versions, a benchmark comparison with named competitors, hardware notes, a chat template, and pointers to fine-tuning and ONNX builds.
The main catches are these. All performance numbers come from Microsoft's own evaluation pipeline and have not been checked independently here. The card itself says the model's size limits its factual knowledge, with a TriviaQA score of 57.8. It is English-first and weaker in other languages. The card also asks developers to evaluate and reduce accuracy, safety and fairness risks before use, especially in high-risk settings. Nothing was executed for this report, so no claim here comes from running the model.
Who it is for
The card says the model is intended for commercial and research use in English. It names three kinds of application: environments with limited memory or compute, latency-bound scenarios, and tasks that need strong reasoning, especially code, math and logic. It also describes the model as a building block for generative-AI features and as a way to speed up research on language and multimodal models.
In practice this points to three groups. The first is developers building features for the memory-constrained or latency-sensitive settings Microsoft names. The card does not state actual memory use, latency or running cost. The second is teams that want to run an open model themselves. The third is researchers who want a small baseline or a starting point for fine-tuning. The card links a multi-GPU fine-tuning example script that uses TRL and Accelerate, but that script was outside the reviewed scope.
It is a weaker fit for people who need strong world knowledge without retrieval, strong output in languages other than English, or a ready-made hosted service with known pricing. The card is explicit about the first two weaknesses, and it does not state hosted pricing.
Capabilities
The model takes text and returns generated text, and it works best with chat-format prompts. It supports a 128K-token context. The card says this makes it capable of long-document and meeting summarization and of question answering over long documents.
The card says the June 2024 update improved long-context understanding, instruction following, structured output, multi-turn conversation quality and reasoning, and added explicit support for the system tag. The card reports these figures for the update compared with the original release:
JSON structure output rose from 1.9 to 60.1, and XML structure output from 47.8 to 52.9. The card's average across the six update-comparison rows rose from 25.7 to 37.3. On RULER, a long-context retrieval benchmark, the average was 84.6 against 68.8, and the score at 128K tokens was 65.6 against 43.3. On RepoQA, a long-context code-understanding benchmark, the average was 77 against 32.4, and the Python score was 85 against 27.
In the card's own comparison with other models, the 128K model averages 66.4 across the listed benchmarks. The other averages are 65.5 for Llama-3-8B-Instruct, 64.4 for Mixtral-8x7B, 56.4 for Mistral-7B, 56.0 for Gemma-7B and 70.3 for GPT-3.5-Turbo-1106. Individual scores include MMLU 69.7, GSM8K 85.3, HumanEval 60.4, MBPP 70.0 and GPQA 29.7. On the card's set of long-context summarization and question-answering benchmarks it averages 25.9, against 13.6 for Mistral-7B, 19.0 for Mixtral 8x7B and 10.3 for LLaMA-3-8B-Instruct. Microsoft reported all of these figures. As the card itself notes, different evaluation choices could give different numbers.
Using it
Requirements
For the standard Hugging Face route, the card lists these example packages: flash_attn 2.5.8, torch 2.3.1, accelerate 0.31.0 and transformers 4.41.2. It says the model had been integrated into the development version of transformers (4.41.3) at the time of writing. Until an official release was out, users had two options: pass trust_remote_code=True when loading the model, or install transformers from source. This guidance is dated. The card does not say which released transformers versions support the model natively, and it does not establish whether a current release needs neither workaround.
The model uses flash attention by default, and flash attention needs certain GPUs. Microsoft says it tested on NVIDIA A100, A6000 and H100. For V100 or older GPUs, the card says to load the model with attn_implementation set to eager. For optimized inference on GPU, CPU and mobile, it recommends the separate ONNX models.
The card does not state memory (RAM or VRAM) requirements, disk size, or expected speed on any hardware, so these are unknown from this evidence. The sample code selects a CUDA device, so that route assumes a GPU.
How it works
The model is a dense decoder-only Transformer with 3.8B parameters and a 128K-token context. Its vocabulary supports up to 32064 tokens. The tokenizer files already include placeholder tokens that can be used for downstream fine-tuning.
Under training details, the card lists 4.9 trillion tokens of training data, 512 H100-80G GPUs and a training time of 10 days, with training carried out between May and June 2024. It does not say how these figures divide between training stages. The training data has three parts. The first is publicly available documents, filtered for quality, together with educational data and code. The second is synthetic, textbook-like data for math, coding, common-sense reasoning and general knowledge. The third is high-quality supervised data in chat format. After initial training, the model went through post-training with supervised fine-tuning and direct preference optimization, to improve instruction following and safety behaviour. Microsoft says it filtered the data toward reasoning-dense content and removed material such as day-to-day sports results, to leave more capacity for reasoning in a small model.
The card calls the model static, trained on an offline dataset with an October 2023 cutoff. It says the model's weak factual recall comes from its small size. Microsoft writes that it believes this weakness can be overcome by pairing the model with a search engine.
Setup
The card's route uses a Python environment with the packages listed above. You load AutoModelForCausalLM from microsoft/Phi-3-mini-128k-instruct with device_map set to cuda, torch_dtype set to auto and trust_remote_code set to True. You then load the matching AutoTokenizer and build a transformers text-generation pipeline. The card's example generation settings are max_new_tokens 500, temperature 0.0 and do_sample False.
The card's example passes trust_remote_code=True, and the card offers installing the development version of transformers as the alternative. The card does not explain what the flag does, so its effects are unverified from this source. No repository code was inspected for this report. Readers with security requirements should check what the flag does before relying on it.
The card names other routes as well. Flash attention can be turned on with attn_implementation set to flash_attention_2, and eager attention can be used on older GPUs. There are ONNX Runtime builds: int4 for DirectML, quantized with AWQ; fp16 for CUDA; int4 for CUDA, quantized with RTN; and int4 for CPU and mobile, quantized with RTN. The model is also available in Azure AI Studio, and the card links a Phi-3 Cookbook. The ONNX repositories, Azure pages and cookbook were not reviewed.
Example of use
The card says the model works best with a chat template. A system turn opens with the system tag, then comes a user turn, and the model writes its reply after an assistant tag. Each turn ends with an end tag. For a single question, the prompt is the system tag, a line such as You are a helpful assistant, the end tag, the user tag, the question, the end tag, and then the assistant tag. For a multi-turn or few-shot chat, earlier user and assistant turns are added in the same format before the final assistant tag.
The card's Python example uses four messages: a system instruction, a question about combining bananas and dragonfruit, a short assistant answer, and a follow-up asking how to solve 2x + 3 = 7. The pipeline then prints the generated text. This example comes from the card. It was not run for this report, and its output is not known here.
Assessment & evidence
Limitations and risks
The card lists these limits. Quality is lower for languages other than English and for English varieties that are less represented in the training data. Despite safety post-training, the model can reinforce stereotypes or over- or under-represent groups of people. It can produce inappropriate or offensive content. It can produce content that sounds plausible but is wrong or outdated. Its code knowledge is concentrated in Python with common packages (typing, math, random, collections, datetime, itertools). Microsoft strongly recommends checking by hand any API use in other packages or languages.
The card says the model was not designed or evaluated for every downstream purpose. It advises extra assessment and safeguards before use in high-risk or consequential settings, such as legal or health advice, or decisions about housing, employment or credit. It also warns of misuse for fraud, spam or malware. It suggests telling end users they are dealing with an AI system, adding feedback mechanisms, and using retrieval-augmented generation to ground answers.
The benchmark tables also show limits. The factual-knowledge score is 35.8, against 43.1 to 63.4 for the compared models. The multilingual score is 56.4, against 57.4 to 71.0 for those models. On RULER, long-context retrieval scores drop from 92.4 at 4K tokens to 65.6 at 128K tokens, so on that benchmark the scores are lower at the longest lengths. The card reports that JSON structure output improved from 1.9 to 60.1 in the update. It does not define that metric well enough to tell how often output is valid. The card encourages users to test in their own applications.
The weights, tokenizer, repository code and safety behaviour were not inspected or run for this report.
Reasoning behind the assessment
The assessment rests on the card's stated specifications, its release notes and its benchmark tables. Some of the card's averages can be checked against the rows listed beside them. In the release-notes table, the original average of 25.7 and the June 2024 average of 37.3 match the means of the six listed rows (about 25.73 and 37.25). In the main benchmark table, the 128K model's average of 66.4 matches the mean of its 18 listed scores. These checks show only that those particular averages follow from the numbers listed. They do not verify the underlying scores. All other averages in the card, including those in the long-context summarization table, are treated here as figures reported by Microsoft.
Microsoft says all the reported numbers were produced with the same evaluation pipeline, using few-shot prompts at temperature 0 from an internal Microsoft evaluation tool. It says it did no optimization of that pipeline specifically for Phi-3: it did not change prompts, pick different few-shot examples or change the prompt format for the model. Using one pipeline for every model does not show that the pipeline was never tuned for some other model. The card also calls the results state-of-the-art among models under 13B parameters, which is a vendor claim. The card states both strengths and weak spots, the weak spots being world knowledge, languages other than English, code beyond Python, and bias. Both the strengths and the weak spots are publisher statements, and the arithmetic checks above do not independently confirm either.
Three things would change the picture: independent reproduction of the benchmarks, measured memory use and speed on your own hardware, and a review of the repository files and of what the trust_remote_code flag does. None of these were available.
Alternatives
Within the same family, the card links several other models. Phi-3-mini-4k-instruct has a 4K context and comes in Hugging Face, ONNX and GGUF versions. There are also Small models (8K and 128K), Medium models (4K and 128K) and a Vision model (128K). The newer Phi-4-mini-instruct and Phi-4-multimodal-instruct are linked too, with ONNX builds. The card gives no comparison with the Phi-4 models, and whether they suit a given job better was not assessed.
The card compares this model on its own benchmarks with Mistral-7B-v0.1, Mixtral-8x7B, Gemma 7B, Llama-3-8B-Instruct and GPT-3.5-Turbo-1106. On average it is ahead of Mistral-7B and Gemma-7B, ahead of Mixtral-8x7B and Llama-3-8B-Instruct by a smaller margin, and behind GPT-3.5-Turbo-1106. It trails several of them on TriviaQA and in the multilingual category.
The right choice depends on things the card cannot settle: your languages, how much stored factual knowledge you need, your hardware, and the licence terms of each alternative. Those terms were not reviewed here.
Evidence base
The analysis uses one source: the public Hugging Face model card (README) for microsoft/Phi-3-mini-128k-instruct at pinned revision f3c06aed622e14ca0abf5115094e4fc9a9948f36, at [https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/raw/f3c06aed622e14ca0abf5115094e4fc9a9948f36/README.md]. The card includes an MIT licence declaration, a trademark notice and links to a LICENSE file. The text of that file was not available for this report. The card is first-party documentation written by the model's publisher. It is authoritative for what Microsoft claims, but it is not independent evidence of how the model behaves.
No code, weights or linked pages were fetched. Nothing was executed, and no benchmark was reproduced. The benchmark scores are quoted from the card.
Access & freshness
Costs
The card does not say what it costs to get or use the model weights. It declares an MIT licence, but the licence text was not captured, so the cost of getting the model is unknown from this evidence. Running costs are also unknown. They would depend on your hardware or cloud provider and on the quantization and attention settings you choose, and the card says nothing about memory use, throughput or cost per request.
The card mentions Azure AI Studio and a Phi-3 portal but gives no hosted pricing, quotas or terms. The 512 H100 GPUs and 10 days of training describe Microsoft's own training, not a cost to users. The card does not state fine-tuning costs either.
Rights and licence
The card's front matter declares license: mit and links to a LICENSE file. A License section also says the model is licensed under the MIT licence. The two links point to slightly different repository paths: Phi-3-mini-128k-instruct in the front matter and Phi-3-mini-128k in the License section. The licence file was outside the captured scope and its text was not available, so the exact copyright notice and wording are not confirmed here.
The card adds that nothing in it should be read as restricting or changing the licence. It says developers must follow applicable laws and regulations, including privacy and trade-compliance rules. It also carries a trademark notice: use of Microsoft trademarks or logos must follow Microsoft's Trademark and Brand Guidelines and must not imply Microsoft sponsorship.
The card does not state rights for the training data. It points to a separate data summary and to the technical report, and neither was reviewed.
Freshness
The card says the model was trained between May and June 2024 on data with an October 2023 cutoff, and released in June 2024. It calls the model static and says future tuned versions may be released. It describes the June 2024 release as an update over the original Phi-3-mini and gives a commit id (bb5bf1e4001277a606e11debca0ef80323e5f824) for the earlier version.
The card opens with links to the newer Phi-4 models, so a newer family exists. The card does not say whether Phi-3 is still maintained, and this report does not assess that. The setup advice about the development version of transformers dates from mid-2024 and may be out of date. This report was written from a copy of the fixed revision captured on 14 November 2026. The live page may have changed since then.
Suggested next steps
If you are considering this model, first decide whether a 3.8B English-first model fits your task. Check your hardware against the options the card lists: a GPU with flash attention, eager attention on older GPUs, or ONNX builds for CPU and mobile. Measure memory use and speed yourself, because the card gives neither.
Test it on your own prompts before relying on it, especially for factual recall, text in other languages, structured JSON output and very long inputs near 128K tokens. If you plan to use trust_remote_code, first check what the flag does and review the repository files, or check whether your transformers version supports the model natively. For anything high-risk, add the safeguards the card recommends: grounding with retrieval, output checks and telling users they are dealing with an AI system.
Before shipping a commercial product, read the full MIT licence text and the data summary. If recency matters, compare the newer Phi-4 models. This report did not review any of those.
