MCPcopy Index your code
hub / github.com/microsoft/BitNet / set_params

Method set_params

utils/generate-dummy-bitnet-model.py:781–790  ·  view source on GitHub ↗
(self, params: str)

Source from the content-addressed store, hash-verified

779 params: str = ""
780
781 def set_params(self, params: str):
782 self.params = params
783 hp_config = model_config[self.params]
784 self.hparams["hidden_size"] = hp_config["hidden_size"]
785 self.hparams["intermediate_size"] = hp_config["intermediate_size"]
786 self.hparams["num_hidden_layers"] = hp_config["num_hidden_layers"]
787 self.hparams["num_attention_heads"] = hp_config["num_attention_heads"]
788 self.hparams["num_key_value_heads"] = hp_config["num_attention_heads"]
789 self.block_count = self.find_hparam(["n_layers", "num_hidden_layers", "n_layer"])
790 self.tensor_map = gguf.get_tensor_name_map(self.model_arch, self.block_count)
791
792
793 def set_vocab(self):

Callers 1

mainFunction · 0.80

Calls 1

find_hparamMethod · 0.45

Tested by

no test coverage detected