MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / model_provider

Function model_provider

tests/test_inference_oneflow.py:17–28  ·  view source on GitHub ↗

Build the model.

(args)

Source from the content-addressed store, hash-verified

15os.environ["ONEFLOW_LINEAR_EMBEDDING_SKIP_INIT"] = "1"
16
17def model_provider(args):
18 """Build the model."""
19
20 model = CodeGeeXModel(
21 args.hidden_size,
22 args.num_layers,
23 args.num_attention_heads,
24 args.padded_vocab_size,
25 args.max_position_embeddings
26 )
27
28 return model
29
30
31def add_code_generation_args(parser):

Callers 1

mainFunction · 0.70

Calls 1

CodeGeeXModelClass · 0.90

Tested by

no test coverage detected