Hosstia/AliceAI-T5-35B-A0.6B-MLX-6bit main
Python json.load callAI PyTorch or SafeTensors extension
SHA-2566c5da07d481b613a4806bcdd053b74dad8feaf920c01f7a89710e25cf476881f
MaleculeH₂(DbF₂)
Evidence
1"""Encoder-decoder model, weight loading and generation for AliceAI-T5-35B MLX."""
2
3from __future__ import annotations
⋯10 lines
78:17… y:
79 tgt_len = hidden.shape[1]
80
81 # With a KV cache and a single new token there is nothing to mask.
82 self_mask = None
83 if t …
108:25… ``AliceAIT5MoEForConditionalGeneration``.
109
110 The LM head is tied to ``encoder.embed_tokens.weight``. MLX's
111 ``load_weights`` replaces entries …
214:17… model_dir: str) -> AliceAIT5MoEConfig:
215 with open(os.path.join(model_dir, "config.json"), "r", encoding="utf-8") as f:
216 return AliceAIT5MoEConfig.from_json(json.load(f))
217
218
⋯4 lines
251:2… model = AliceAIT5MoEModel(config)
252
253 weight_files = sorted(glob.glob(os.path.join(model_dir, "model-*.safetensors")))
254 if not weight_files:
255 single = os.path.join(model_dir, "model.safetensors")
256 if os.path.exists(single):
257 weight_files = [single]
258 if not weight_files:
259 raise FileNotFoundErro …