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
and coremltools/optimize/torch/layerwise_compression/layerwise_compressor.py which are adapted from
32
+
gtpq (https://github.com/IST-DASLab/gptq/). It also contains content in the file coremltools/optimize/torch/layerwise_compression/algorithms.py which is adapted from sparsegpt (https://github.com/IST-DASLab/sparsegpt). The license for these follows:
33
+
34
+
Apache License 2.0
35
+
36
+
Copyright 2023 IST Austria Distributed Algorithms and Systems Lab
37
+
38
+
Licensed under the Apache License, Version 2.0 (the "License");
39
+
you may not use this file except in compliance with the License.
40
+
You may obtain a copy of the License at
41
+
42
+
http://www.apache.org/licenses/LICENSE-2.0
43
+
44
+
Unless required by applicable law or agreed to in writing, software
45
+
distributed under the License is distributed on an "AS IS" BASIS,
46
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
47
+
See the License for the specific language governing permissions and
by providing the ``StateType`` in the ``states`` argument (for details see `MIL Input Types <https://apple.github.io/coremltools/source/coremltools.converters.mil.input_types.html>`_).
485
+
The stateful model is useful when converting a large language model with KV-Cache.
486
+
The name of ``StateType`` must match the key of the PyTorch ``named_buffers()`` method in the source traced model.
487
+
488
+
The following example converts a torch model with a buffer called ``state_1``.
0 commit comments