Skip to content

Conversation

@vovanphuc
Copy link
Contributor

Summary

  • Rename lfm template to lfm2 for consistency with the vision template lfm2_vl
  • Add LFM 2.5 (VL) models to the supported models table in README

Changes

Template Renaming

  • template.py: Renamed template from lfm to lfm2, updated tool_format references
  • tool_utils.py: Renamed LFM_TOOL_PROMPTLFM2_TOOL_PROMPT, LFMToolUtilsLFM2ToolUtils
  • constants.py: Updated model registration to use template="lfm2"
  • test_formatter.py: Renamed all test_lfm_* functions to test_lfm2_*

Documentation

  • Added LFM 2.5 (VL) to supported models table in both README.md and README_zh.md

Motivation

The vision template was named lfm2_vl while the text template was named lfm. This inconsistency could cause confusion. Renaming to lfm2 creates a consistent naming convention:

  • Text models: lfm2
  • Vision models: lfm2_vl

Checklist

  • Template renamed from lfm to lfm2
  • Tool utilities class renamed accordingly
  • All tests updated and passing
  • README documentation updated
  • No remaining "lfm" (without 2) references in codebase

- Rename template 'lfm' to 'lfm2' for consistency with 'lfm2_vl'
- Rename LFMToolUtils to LFM2ToolUtils and update tool_format references
- Update lfm2_vl template to use tool_format='lfm2'
- Rename test functions from test_lfm_* to test_lfm2_*
- Add LFM 2.5 (VL) to supported models table in README.md and README_zh.md
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @vovanphuc, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the naming convention for the LFM template, changing it from lfm to lfm2. This standardization ensures consistency with the existing lfm2_vl vision template, making the codebase more intuitive and maintainable. The changes involve updating template registrations, tool utility classes, and corresponding test cases. Additionally, the documentation has been enhanced to reflect the support for LFM 2.5 (VL) models.

Highlights

  • Template Renaming: The lfm template has been consistently renamed to lfm2 across template.py, tool_utils.py, and constants.py to align with the lfm2_vl vision template, improving naming consistency.
  • Tooling Utilities Update: The LFM_TOOL_PROMPT constant and LFMToolUtils class in tool_utils.py have been updated to LFM2_TOOL_PROMPT and LFM2ToolUtils respectively, reflecting the new template name.
  • Test Suite Refactoring: All relevant test functions in test_formatter.py were renamed from test_lfm_* to test_lfm2_* and updated to use the new lfm2 template name, ensuring test coverage for the refactored components.
  • Documentation Update: The README.md and README_zh.md files have been updated to include LFM 2.5 (VL) models in the supported models table, providing up-to-date information for users.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Owner

@hiyouga hiyouga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a straightforward refactoring to rename the lfm template to lfm2 for better consistency with the lfm2_vl vision template. The changes are applied consistently across template definitions, tool utilities, model registration, and tests. Additionally, the README files have been updated to include the LFM 2.5 models. The changes are well-motivated and correctly implemented. I've included one minor suggestion to improve code readability in a test file.

@hiyouga hiyouga merged commit 5cfd804 into hiyouga:main Jan 7, 2026
17 checks passed
@hiyouga hiyouga added the solved This problem has been already solved label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

solved This problem has been already solved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants