Model: Support LiquidAI/LFM2 (Dense) (700M,1.2B, 2.6B) #16065
Model: Support LiquidAI/LFM2 (Dense) (700M,1.2B, 2.6B) #16065blazingbhavneek wants to merge 5 commits intosgl-project:mainfrom
Conversation
Summary of ChangesHello @blazingbhavneek, 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 significantly expands SGLang's model compatibility by introducing full support for the LiquidAI LFM2 model family. This integration allows users to leverage LFM2's efficient hybrid architecture, which is optimized for on-device deployment and fast inference, within the SGLang framework. The changes encompass the addition of model-specific configurations, the implementation of its unique attention and convolutional layers, and thorough validation through accuracy tests and benchmarks. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the LiquidAI/LFM2 model family. The changes include adding the model configuration, the model implementation itself, and integrating it into the existing server infrastructure and tests. The implementation appears to be a solid port from vLLM and Hugging Face Transformers. I've identified a few areas for improvement, including a potential TypeError that could occur in the model's forward pass, a couple of unused parameters, and a redundant computation. My review includes specific suggestions to address these points.
|
/tag-and-rerun-ci |
|
I also made a version of dense LFM2, utilizing the |
|
Closing this PR on request of LiquidAI reps |
Motivation
Add Support for LFM2 Model Family (Dense) by Liquid AI
Modifications
Porting Model implementation from vLLM and Huggingface
Accuracy Tests
Command for SGLang Server:
python -m sglang.launch_server --model-path LiquidAI/LFM2-700M --port 30000 --attention-backend tritonCommand for vLLM Server:
python3 -m vllm.entrypoints.api_server --tokenizer-mode auto --model LiquidAI/LFM2-700M --disable-log-requests --port 21000MMLU:
LFM2-700M
SGLang
vLLM
Benchmarking and Profiling
Benchmark
Checklist