Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new o1-mini and o1-preview models #1226

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Add new o1-mini and o1-preview models #1226

merged 2 commits into from
Sep 13, 2024

Conversation

KennyDizi
Copy link
Contributor

@KennyDizi KennyDizi commented Sep 13, 2024

PR Type

Enhancement


Description

  • Added new o1-mini and o1-mini-2024-09-12 models with a token limit of 128K.
  • Added new o1-preview and o1-preview-2024-09-12 models with a token limit of 128K.

Changes walkthrough

Relevant files
Enhancement
__init__.py
Add new o1-mini and o1-preview models                                       

pr_agent/algo/init.py

  • Added new model entries o1-mini and o1-mini-2024-09-12.
  • Added new model entries o1-preview and o1-preview-2024-09-12.
  • +4/-0     

    Copy link
    Contributor

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🏅 Score: 95
    🧪 No relevant tests
    🔒 No security concerns identified
    🔀 No multiple PR themes
    ⚡ No key issues to review

    Copy link
    Contributor

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Maintainability
    Define constants for repeated values to improve maintainability

    Consider adding a constant for the token limit (128000) and the comment text to
    avoid repetition and make future updates easier.

    pr_agent/algo/init.py [22-25]

    -'o1-mini': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'o1-mini-2024-09-12': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'o1-preview': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'o1-preview-2024-09-12': 128000,  # 128K, but may be limited by config.max_model_tokens
    +O1_TOKEN_LIMIT = 128000
    +O1_COMMENT = "128K, but may be limited by config.max_model_tokens"
    +'o1-mini': O1_TOKEN_LIMIT,  # O1_COMMENT
    +'o1-mini-2024-09-12': O1_TOKEN_LIMIT,  # O1_COMMENT
    +'o1-preview': O1_TOKEN_LIMIT,  # O1_COMMENT
    +'o1-preview-2024-09-12': O1_TOKEN_LIMIT,  # O1_COMMENT
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion improves code maintainability by reducing repetition and making future updates easier, which is particularly valuable for configuration data like token limits.

    8
    Enhancement
    Use a dictionary comprehension to create entries for similar models

    Consider using a dictionary comprehension to create the entries for the 'o1' family
    models. This can make the code more concise and easier to maintain, especially if
    more models are added in the future.

    pr_agent/algo/init.py [22-25]

    -'o1-mini': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'o1-mini-2024-09-12': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'o1-preview': 128000,  # 128K, but may be limited by config.max_model_tokens
    -'o1-preview-2024-09-12': 128000,  # 128K, but may be limited by config.max_model_tokens
    +**o1_models = {f'o1-{model}{"-" + date if date else ""}': 128000 for model in ['mini', 'preview'] for date in ['', '2024-09-12']}
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion offers a more concise and maintainable way to define similar model entries, which is beneficial for code readability and future updates.

    7

    @KennyDizi KennyDizi changed the title Add OpenAI o1 family model Add new o1-mini and o1-preview models Sep 13, 2024
    @KennyDizi
    Copy link
    Contributor Author

    👑 🌏 I have synchronized the PR description with the latest commit (a944962).

    @mrT23
    Copy link
    Collaborator

    mrT23 commented Sep 13, 2024

    I will try to benchmark them on this
    https://pr-agent-docs.codium.ai/finetuning_benchmark/
    when I have the time

    @mrT23 mrT23 merged commit 867a430 into Codium-ai:main Sep 13, 2024
    2 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants