MCPcopy
hub / github.com/SesameAILabs/csm / _prepare_transformer

Function _prepare_transformer

models.py:48–52  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

46
47
48def _prepare_transformer(model):
49 embed_dim = model.tok_embeddings.embedding_dim
50 model.tok_embeddings = nn.Identity()
51 model.output = nn.Identity()
52 return model, embed_dim
53
54
55def _create_causal_mask(seq_len: int, device: torch.device):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected