Microsoft: Phi 4
microsoft/phi-4- Modalities
- text->text
- In / out price
- $0.07 / $0.14
- Context
- 16K
- Released
- Jan 10, 2025
- Knowledge cutoff
- 2024-06-30
per 1M
Microsoft Research 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...
Supported parameters
frequency_penaltyFrequency penalty
Lowers the chance of a token in proportion to how often it already appeared.
logit_biasLogit bias
Add or subtract from token ids to encourage or ban them.
max_tokensMax tokens
Upper bound on generated tokens. Output stops at the limit.
min_pMin-p
Drops tokens below this probability threshold.
presence_penaltyPresence penalty
Lowers the chance of any token that has already appeared.
repetition_penaltyRepetition penalty
Penalizes text that already appeared. Common on open models.
response_formatResponse format
For example json_object or json_schema, to constrain the shape.
seedSeed
A fixed seed helps reproduce sampling. It does not guarantee byte-identical output.
stopStop
Stop when these strings are produced. A string or an array of strings.
structured_outputsStructured outputs
Generate a parseable structure that follows a JSON Schema.
temperatureTemperature
Sampling temperature. Lower is steadier, higher is more varied. Often 0 to 2.
top_kTop-K
Sample only from the K most likely tokens.
top_pTop-p
Sample only from tokens whose cumulative probability reaches top_p.