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

Method __init__

train/patch/modeling_chatglm.py:724–730  ·  view source on GitHub ↗
(self, config: ChatGLMConfig, empty_init=True, device=None)

Source from the content-addressed store, hash-verified

722
723class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel):
724 def __init__(self, config: ChatGLMConfig, empty_init=True, device=None):
725 super().__init__(config)
726
727 self.max_sequence_length = config.max_length
728 self.transformer = ChatGLMModel(config, empty_init=empty_init, device=device)
729 self.config = config
730 self.pack_loss = False
731
732 def _update_model_kwargs_for_generation(
733 self,

Callers

nothing calls this directly

Calls 2

ChatGLMModelClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected