MCPcopy Create free account
hub / github.com/THUDM/LongWriter / __init__

Method __init__

train/patch/modeling_llama.py:1511–1517  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

1509
1510 # Copied from transformers.models.bloom.modeling_bloom.BloomForQuestionAnswering.__init__ with Bloom->Llama
1511 def __init__(self, config):
1512 super().__init__(config)
1513 self.transformer = LlamaModel(config)
1514 self.qa_outputs = nn.Linear(config.hidden_size, 2)
1515
1516 # Initialize weights and apply final processing
1517 self.post_init()
1518
1519 def get_input_embeddings(self):
1520 return self.transformer.embed_tokens

Callers

nothing calls this directly

Calls 2

LlamaModelClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected