You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue 1: AutoGPTQ backend remains a script and isn’t integrated as a runtime
api/src/main/backend/gptq.py still contains installation commands and example code instead of a CoreRuntime subclass, so it cannot be used like the other backends.
Implement and register AutoGPTQ runtime
Remove script-style content from api/src/main/backend/gptq.py and introduce a GPTQRuntime class inheriting from CoreRuntime.
Load models via AutoGPTQForCausalLM.from_quantized and implement a __call__ method that provides both streaming and non-streaming generation similar to BinRuntime.
Register the backend at the bottom of the file with CoreRuntime.register_backend("GPTQRuntime", GPTQRuntime).
Update api/src/main/backend/__init__.py:
Add GPTQ = "GPTQRuntime" to the BackendType enum.
Import GPTQRuntime with from .gptq import GPTQRuntime.
Modify GPTQ-capable model classes (e.g., api/src/main/models/qwen3/model.py) to include BackendType.GPTQ in supported_backends and handle it in _get_runtime.
Although BinRuntime defines a local cache path, it uses None for cache_dir in from_pretrained, causing inconsistent cache usage, and it doesn’t save the tokenizer locally.
Improve BinRuntime caching and quantization options
In api/src/main/backend/bin.py, pass cache_dir or self.__cache_dir to both AutoModelForCausalLM.from_pretrained and AutoTokenizer.from_pretrained, and include trust_remote_code=True.
Save the tokenizer to the same cache path with tokenizer.save_pretrained(save_path) whenever downloading a model.
Expose quantization_config as an optional constructor argument and document how to adjust BitsAndBytesConfig settings.
Issue 3: AutoGPTQ dependency missing from pyproject.toml
pyproject.toml lists bitsandbytes but not auto-gptq, so installations fail when the AutoGPTQ backend is used.
Add AutoGPTQ dependency
Add "auto-gptq>=0.x" to the [project] dependencies section in pyproject.toml.
Update documentation (e.g., README) to mention AutoGPTQ requirements and GPU/CUDA compatibility notes.
Issue 1: AutoGPTQ backend remains a script and isn’t integrated as a runtime
Implement and register AutoGPTQ runtime
Remove script-style content from
api/src/main/backend/gptq.pyand introduce aGPTQRuntimeclass inheriting fromCoreRuntime.AutoGPTQForCausalLM.from_quantizedand implement a__call__method that provides both streaming and non-streaming generation similar toBinRuntime.Register the backend at the bottom of the file with
CoreRuntime.register_backend("GPTQRuntime", GPTQRuntime).Update
api/src/main/backend/__init__.py:GPTQ = "GPTQRuntime"to theBackendTypeenum.GPTQRuntimewithfrom .gptq import GPTQRuntime.Modify GPTQ-capable model classes (e.g.,
api/src/main/models/qwen3/model.py) to includeBackendType.GPTQinsupported_backendsand handle it in_get_runtime.Issue 2: BinRuntime lacks consistent cache handling and flexible quantization settings
Improve BinRuntime caching and quantization options
api/src/main/backend/bin.py, passcache_dir or self.__cache_dirto bothAutoModelForCausalLM.from_pretrainedandAutoTokenizer.from_pretrained, and includetrust_remote_code=True.tokenizer.save_pretrained(save_path)whenever downloading a model.quantization_configas an optional constructor argument and document how to adjustBitsAndBytesConfigsettings.Issue 3: AutoGPTQ dependency missing from pyproject.toml
Add AutoGPTQ dependency
"auto-gptq>=0.x"to the[project] dependenciessection inpyproject.toml.