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

Method __init__

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

Source from the content-addressed store, hash-verified

1391)
1392class LlamaForSequenceClassification(LlamaPreTrainedModel):
1393 def __init__(self, config):
1394 super().__init__(config)
1395 self.num_labels = config.num_labels
1396 self.model = LlamaModel(config)
1397 self.score = nn.Linear(config.hidden_size, self.num_labels, bias=False)
1398
1399 # Initialize weights and apply final processing
1400 self.post_init()
1401
1402 def get_input_embeddings(self):
1403 return self.model.embed_tokens

Callers

nothing calls this directly

Calls 2

LlamaModelClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected