YFarmX logoYFarmX

Microsoft: Phi 4

microsoft/phi-4 · MicrosoftTokenizer lineage measured
Tokenizer lineage (measured)
OpenAI cl100k
Entered catalogue
10 January 2025
Last tested
21 August 2026
Evidence confidence
High

Why high: an exact fingerprint shared with 5 models.

Evidence
  • ✓ exact tokenizer signature shared with 5 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)

What we checked

Four different kinds of evidence, and what each one showed
We checkedWhat we foundWhere it came from
How it counts tokensCounts every one of the 50 test strings exactly like 5 other modelstk_ba918336
How its API is set upA combination of settings no other listing in the catalogue usesapi_b985bdd1
How much it can read and writeReads up to 16,384 tokens at onceOpenRouter's listing shows 14,745 output tokens, which is 90% of the context window, the figure it carries where the provider declares no maximum.its own listing
Who served our requestsDeepInfrawe measured it, 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

What each test string cost this model, in tokens

We sent Microsoft: Phi 4 fifty short pieces of text and recorded what each one cost it in tokens. The bars below are those costs. Two models built on the same tokenizer produce the same bars; a model built on a different one produces a different set, which is what makes this a fingerprint.

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

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.