MCPcopy Create free account
hub / github.com/huggingface/transformers / __init__

Method __init__

src/transformers/modeling_ctrl.py:484–489  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

482)
483class CTRLLMHeadModel(CTRLPreTrainedModel):
484 def __init__(self, config):
485 super().__init__(config)
486 self.transformer = CTRLModel(config)
487 self.lm_head = nn.Linear(config.n_embd, config.vocab_size, bias=True)
488
489 self.init_weights()
490
491 def get_output_embeddings(self):
492 return self.lm_head

Callers

nothing calls this directly

Calls 3

CTRLModelClass · 0.85
__init__Method · 0.45
init_weightsMethod · 0.45

Tested by

no test coverage detected