Omarrran commited on
Commit
1d2a4ca
·
verified ·
1 Parent(s): 18dbe3c

Refresh cleaned Transformers-compatible files

Browse files
Files changed (1) hide show
  1. modeling_ksbyte.py +3 -3
modeling_ksbyte.py CHANGED
@@ -665,9 +665,9 @@ class KsByteForCausalLM(PreTrainedModel, GenerationMixin):
665
  supports_gradient_checkpointing = False
666
  _supports_cache_class = False
667
  _tied_weights_keys = ["model.lm_head.weight"]
668
- # Newer Transformers releases (seen in Colab/PyTorch 2.8 stacks) access
669
- # this public attribute during post-load tied-weight handling.
670
- all_tied_weights_keys = ["model.lm_head.weight"]
671
 
672
  def __init__(self, config: KsByteConfig):
673
  super().__init__(config)
 
665
  supports_gradient_checkpointing = False
666
  _supports_cache_class = False
667
  _tied_weights_keys = ["model.lm_head.weight"]
668
+ # Some Transformers releases expect this to be a dict and call .keys();
669
+ # others only need membership. Keep it dict-shaped for Colab compatibility.
670
+ all_tied_weights_keys = {"model.lm_head.weight": "model.embed.weight"}
671
 
672
  def __init__(self, config: KsByteConfig):
673
  super().__init__(config)