forked from AutoGPTQ/AutoGPTQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add starcoder2 support (AutoGPTQ#578)
* add starcoder2 support * add starcoder2 support
- Loading branch information
1 parent
80b0571
commit 09289d8
Showing
4 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from logging import getLogger | ||
|
||
from ._base import BaseGPTQForCausalLM | ||
|
||
|
||
logger = getLogger(__name__) | ||
|
||
|
||
class Starcoder2GPTQForCausalLM(BaseGPTQForCausalLM): | ||
layer_type = "Starcoder2DecoderLayer" | ||
layers_block_name = "model.layers" | ||
outside_layer_modules = ["model.embed_tokens", "model.norm"] | ||
inside_layer_modules = [ | ||
["self_attn.k_proj", "self_attn.v_proj", "self_attn.q_proj"], | ||
["self_attn.o_proj"], | ||
["mlp.c_fc"], | ||
["mlp.c_proj"], | ||
] | ||
|
||
|
||
__all__ = ["Starcoder2GPTQForCausalLM"] |