experimental_experiment.torch_models.phi3_helper

experimental_experiment.torch_models.phi3_helper.get_phi3_model(input_dims: Sequence[Tuple[int, int]] = ((13, 7), (14, 7), (15, 8)), hidden_size=32, num_hidden_layers=2, vocab_size=99, intermediate_size=16, max_position_embeddings=512, num_attention_heads=4, num_key_value_heads=2, _attn_implementation='eager', with_mask: bool = True)[source]

Returns a model. See PhiConfig. The parameters are chosen for a unit test configuration from test_modeling_phi.py.

experimental_experiment.torch_models.phi3_helper.has_phi3() bool[source]

Tells if package transformers is recent enough.