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
when pip install, marlin kernel could not find ValueError: Trying to use the marlin backend, but could not import the C++/CUDA dependencies with the following error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/wenhuach/anaconda3/envs/autoround/lib/python3.10/site-packages/gptqmodel_marlin_cuda_inference.cpython-310-x86_64-linux-gnu.so)
Got it. It would be beneficial for GPTQModel to provide a backward-compatible API for layer packing and repacking, accommodating both the original AutoGPTQ linear layer and your/AutoRound fixed zero-point layer in future implementations. This would allow seamless reliance on your CUDA kernels for Marlin, asymmetric quantization, and other operations in AutoRound side.
Got it. It would be beneficial for GPTQModel to provide a backward-compatible API for layer packing and repacking, accommodating both the original AutoGPTQ linear layer and your/AutoRound fixed zero-point layer in future implementations. This would allow seamless reliance on your CUDA kernels for Marlin, asymmetric quantization, and other operations in AutoRound side.
We are adding hf_select_quant_linear as external api for HF/optimum repo. Can autoeound use this? Api is going stable later today/tonight.
Thanks for the info. However, this may not help in our side, we need layer-wise packing and repacking as autoround could support mixed bits or mixed group size .
changed the title [-][Feature] Expose stable kernel/packing/repacking apis[/-][+][INTEGRATION] Expose stable kernel/packing/repacking apis[/+]on Dec 5, 2024
@wenhuach21 Our refractor is complete and preparing for transformers/optimum/peft upstream prs to be merged and integrated.
Now is a good time to review exactly what you and the intel/auto-round team needs from us explicatively at code-level. Please provide us with detailed (pseudo code is okay) examples show what apis we need to expose.
@wenhuach21 Our refractor is complete and preparing for transformers/optimum/peft upstream prs to be merged and integrated.
Now is a good time to review exactly what you and the intel/auto-round team needs from us explicatively at code-level. Please provide us with detailed (pseudo code is okay) examples show what apis we need to expose.
Sorry for the delayed response. At the moment, the following come to mind as we want to support mixed bits quantization later
Symmetric Quantization
layer.pack(xxx, backend="marlin") ##Packs the layer using the specified format. Actually WrapperLinear is ok if there is no big change int the future.check_packing_feasibility(xxx, backend) ## check whether the layer and its quantization config could pack with the specified backendcheck_best_packing_format(xxx, target_device="cuda") ##return the best performance format in your repository based on the specified bit-width and group size.
Asymmetric Quantization
Since there are differences in the zero-point (zp) settings, the API should include additional arguments to reflect these variations appropriately.
@wenhuach21 Feel free to open a wip PR and make core changes as you see fit. I can monitor and we can also connect on teams to smooth out ideas. The only things I would require is below:
If the api is exposed externally, add hf_ prefix to the api name. We are doing this for stable apis for transformers/optimum/peft and would follow the same principle here for the layer/packing/repacking changes. So internally it can be def pack but if auto_round wants to call this, we would change this to def hf_pack which may well be just a wrapper for pack but I would still require the wrapper so we can be backward compatible and have stable api.
Activity
Qubitium commentedon Dec 3, 2024
@wenhuach21 It appears there are two issues.
Need linux os version, kernel, libc/glibc version
Thanks. @CSY-ModelCloud
CSY-ModelCloud commentedon Dec 3, 2024
We have renamed gptqmodel_marlin_cuda_inference. Can you try to pull latest and delete build dir? Then pip install it.
wenhuach21 commentedon Dec 3, 2024
Got it. It would be beneficial for GPTQModel to provide a backward-compatible API for layer packing and repacking, accommodating both the original AutoGPTQ linear layer and your/AutoRound fixed zero-point layer in future implementations. This would allow seamless reliance on your CUDA kernels for Marlin, asymmetric quantization, and other operations in AutoRound side.
Qubitium commentedon Dec 3, 2024
We are adding
hf_select_quant_linearas external api for HF/optimum repo. Can autoeound use this? Api is going stable later today/tonight.Tracking PR: #713
Code is not ready. We are finalizing it still. The above pr holds links to hf/optimum pr that will be submitted upstream.
Qubitium commentedon Dec 3, 2024
[1-3] https://github.com/ModelCloud/GPTQModel/pull/727/files
we will expose the 3
hf_prefixed as stable api to hf/optimum. May still be changes. wip.Correction: 4
hf_methods[4] https://github.com/ModelCloud/GPTQModel/pull/728/files
wenhuach21 commentedon Dec 3, 2024
Thanks for the info. However, this may not help in our side, we need layer-wise packing and repacking as autoround could support mixed bits or mixed group size .
Qubitium commentedon Dec 4, 2024
@wenhuach21 We are currently refactoring and make sure gptqmodel is correctly integrated into transformers/optimum/peft.
Can you list the exact api you want? Feel free-form and imagine any/all api you want/desire to have so that autoround can work with our kernels.
Api stability can be enforced by locking pkg depends to specific release as we cant promise internal apis to be always stable.
Let me know a detailed, preferably with pseudo code to illustrate the usage so I can visualize actual usage scenarios. Be as detailed as possible.
[-][Question] install issue[/-][+][Feature] Expose stable kernel/packing/repacking apis[/+][-][Feature] Expose stable kernel/packing/repacking apis[/-][+][INTEGRATION] Expose stable kernel/packing/repacking apis[/+]Qubitium commentedon Dec 10, 2024
@wenhuach21 Our refractor is complete and preparing for transformers/optimum/peft upstream prs to be merged and integrated.
Now is a good time to review exactly what you and the intel/auto-round team needs from us explicatively at code-level. Please provide us with detailed (pseudo code is okay) examples show what apis we need to expose.
wenhuach21 commentedon Dec 10, 2024
Sorry for the delayed response. At the moment, the following come to mind as we want to support mixed bits quantization later
Symmetric Quantization
Asymmetric Quantization
Since there are differences in the zero-point (zp) settings, the API should include additional arguments to reflect these variations appropriately.
wenhuach21 commentedon Dec 10, 2024
sorry, I forgot the repacking API and pos_init API.
Qubitium commentedon Dec 11, 2024
@wenhuach21 Feel free to open a wip PR and make core changes as you see fit. I can monitor and we can also connect on teams to smooth out ideas. The only things I would require is below:
If the api is exposed externally, add
hf_prefix to the api name. We are doing this for stable apis for transformers/optimum/peft and would follow the same principle here for the layer/packing/repacking changes. So internally it can bedef packbut if auto_round wants to call this, we would change this todef hf_packwhich may well be just a wrapper forpackbut I would still require the wrapper so we can be backward compatible and have stable api.Add unit tests to the new
hf_external apis.make the tuning deterministic and move infrequently used arguments to…
Expose stable hf_ kernel/packing/repacking APIs (#726) (#3251)