Skip to content

Commit

Permalink
add 25K to max tokens chosen by user for o1 models
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Dec 18, 2024
1 parent 6ee37e0 commit 045f175
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daras_ai_v2/language_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,10 @@ def _run_openai_chat(
if entry["role"] == CHATML_ROLE_SYSTEM:
entry["role"] = CHATML_ROLE_USER

# reserved tokens for reasoning...
# https://platform.openai.com/docs/guides/reasoning#allocating-space-for-reasoning
max_completion_tokens += 25_000

if avoid_repetition:
frequency_penalty = 0.1
presence_penalty = 0.25
Expand Down

0 comments on commit 045f175

Please sign in to comment.