Microsoft: Phi 4

microsoft/phi-4 · MicrosoftTokenizer lineage measured
Tokenizer lineage (measured)
OpenAI cl100k
Evidence confidence
High
Why high: an exact fingerprint shared with 2 models.
Declared tokenizer tag
Other
Entered catalogue
10 January 2025
Last tested
21 August 2026
Measurement
Measured
Evidence
  • exact tokenizer signature shared with 2 models

Identity statement

Microsoft: Phi 4 is Microsoft's model. Its measured tokenizer sits with the OpenAI cl100k group, which is evidence that it builds on the OpenAI cl100k tokenizer. Tokenizer reuse is normal engineering, open vocabularies travel between labs, and this says nothing against Microsoft's authorship of the model itself.

Whose vocabulary this is

Tokenizer
cl100k_base
Origin of tokenizer
OpenAI tiktoken, open source
Model maker
Microsoft

cl100k_base is an open vocabulary table anyone can build on. Sharing it says which dictionary the model reads with, and nothing about who made the model.

Verification note

Checked against the primary artefacts, 21 August 2026

Phi-4's repository tokenizer, run over the 50 strings offline, matches OpenAI's open cl100k_base encoding on every string (vocabulary 100,352, the padded cl100k table). IBM's Granite 4.0 and 4.1 declare the same vocabulary size and their endpoints return identical counts, which is why Microsoft and IBM share an exact signature group: both build on the tokenizer OpenAI released as open source with tiktoken.

Phi-4 repository (config.json: vocab_size 100352)Granite 4.0 H Micro repository (config.json: vocab_size 100352)OpenAI tiktoken (cl100k_base, open source)

Evidence stack

Signals of different kinds, weighed together
SignalResultReference
Tokenizer signatureExact match with 2 other modelstk_ba918336
API surfaceNo other entry shares this exact contractapi_7f4ca365
Context and output16,384 context · 16,384 max outputdeclared
Reasoning contractNone declareddeclared
Serving providers observedDeepInframeasured 21 August 2026

Shares this fingerprint

Exact signature first; template-boundary shifts of the same signature beneath

Closest measured models

Agreement across the mutually clean test strings

Click a row to open the full comparison.

The measured fingerprint

Marginal prompt-token cost of each test string, grouped by script
All 50 rows

English and whitespace

en-prose14
en-long16
spaces-203
spaces-603
tabs-203
newlines-204
mixed-ws5

Digits

digits-93
digits-124
digits-3010
digits-sep7
float-long9

CJK

zh-common18
zh-long25
zh-rare23
ja-kana14
ja-kanji17
ko19

Other scripts

ru16
ar25
he24
hi32
th25
el29

Emoji

emoji-basic10
emoji-skin30
emoji-zwj-family18
emoji-zwj-x354
emoji-flags24
emoji-prof29

Rare Unicode

math32
boxdraw28
combining14
cjk-ext-b13
surrogates40
zalgo36
rtl-mix11

Code

py-code25
py-indent15
json20
html16
regex44
camel5
snake6

Repetition and encodings

rare-word-x531
repeat-tok22
base6435
hex11
url17
uuid27

An x marks a row excluded as corrupt (caching or provider interference detected during measurement). Overhead subtracted: 7 prompt tokens.

Declared record

What the catalogue claims about this model

[Microsoft Research](/microsoft) Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion...

Modalities
text->text
Declared tokenizer
Other
Prompt price
$0.07 / M tokens
Completion price
$0.14 / M tokens

Supported parameters

frequency_penaltylogit_biasmax_tokensmin_ppresence_penaltyrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetop_ktop_p

defaults: {}

Catalogue entryWeights on Hugging Face

History

Every observation, kept as taken
  • 10 January 2025Enters the OpenRouter catalogue with no declared family.
  • 21 August 2026Fingerprinted in the YFarmX catalogue sweep · 50 of 50 strings measured clean.
  • 21 August 2026YFarmX assessment: consistent with the OpenAI cl100k family, high confidence.

Cite this page as the evidence record for Microsoft: Phi 4: the URL is stable, measurements are dated, and revisions append to the history above. Method: tokenizer fingerprinting, v1, 50 strings. The raw data behind every figure is on the data page.