feat: add fastllm worker for high-performance inference#3828
Open
crawfordxx wants to merge 1 commit intolm-sys:mainfrom
Open
feat: add fastllm worker for high-performance inference#3828crawfordxx wants to merge 1 commit intolm-sys:mainfrom
crawfordxx wants to merge 1 commit intolm-sys:mainfrom
Conversation
Add a new model worker backend based on fastllm (https://github.com/ztxz16/fastllm), a high-performance LLM inference engine with strong CPU acceleration. - Add fastchat/serve/fastllm_worker.py following BaseModelWorker pattern - Support streaming generation with temperature, top_p, top_k, repeat_penalty - Support HuggingFace and .flm model formats - Support int4/int8/float16/float32 quantization via --dtype flag - fastllm is an optional dependency - Add docs/fastllm_integration.md with setup instructions Closes lm-sys#2521
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new model worker backend based on fastllm, addressing #2521.
fastchat/serve/fastllm_worker.py— follows theBaseModelWorkerpattern (consistent withvllm_worker.py,mlx_worker.py, etc.)temperature,top_p,top_k,repetition_penalty,max_new_tokens, and stop strings--dtypeflag supportsfloat16,float32,int8,int4--threadsflag for CPU-bound inferencedocs/fastllm_integration.mdwith installation and usage instructionsUsage
Test Plan
/worker_generate_stream/worker_generate--dtypeoptions (float16, int8, int4)Closes #2521