Skip to content

Commit 7e7a065

Browse files
convert: fold GraniteSpeechTextModel into GraniteModel
1 parent 5493edb commit 7e7a065

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

convert_hf_to_gguf.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10618,11 +10618,6 @@ def set_gguf_parameters(self):
1061810618
self.gguf_writer.add_logit_scale(logits_scale)
1061910619
logger.info("gguf: (granite) logits_scale = %s", logits_scale)
1062010620

10621-
10622-
@ModelBase.register("GraniteSpeechForConditionalGeneration", ModelType.TEXT)
10623-
class GraniteSpeechTextModel(GraniteModel):
10624-
model_arch = gguf.MODEL_ARCH.GRANITE
10625-
1062610621
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
1062710622
if name.startswith(("encoder.", "projector.")):
1062810623
return
@@ -13451,9 +13446,6 @@ def get_model_architecture(hparams: dict[str, Any], model_type: ModelType) -> st
1345113446
# TODO: refactor this later to avoid adding exception here
1345213447
if model_type == ModelType.TEXT and arch == "StepVLForConditionalGeneration":
1345313448
return arch
13454-
if model_type == ModelType.TEXT and arch == "GraniteSpeechForConditionalGeneration":
13455-
return arch
13456-
1345713449
# if "architectures" is found in the sub-config, use that instead
1345813450
if model_type == ModelType.TEXT and text_config.get("architectures") is not None:
1345913451
arch = text_config["architectures"][0]

0 commit comments

Comments
 (0)