3 writes to DType
Microsoft.ML.GenAI.Phi (3)
Phi3\Config.cs (1)
39this.DType = ScalarType.BFloat16;
Phi3\Phi3ForCasualLM.cs (2)
61modelConfig.DType = torchDtype; 89modelConfig.DType = torchDtype;
7 references to DType
Microsoft.ML.GenAI.Phi (7)
Module\Phi3DecoderLayer.cs (3)
93this.input_layernorm = new RMSNorm(config.HiddenSize, config.RmsNormEps, config.DType); 97this.post_attention_layernorm = new RMSNorm(config.HiddenSize, config.RmsNormEps, config.DType); 155dtype: config.DType);
Module\Phi3MLP.cs (1)
27: this(config.HiddenSize, config.IntermediateSize, config.HiddenAct, config.DType)
Module\Phi3Model.cs (2)
35this.embed_tokens = nn.Embedding(config.VocabSize, config.HiddenSize, padding_idx: this._paddingIdx, dtype: config.DType); 43this.norm = new RMSNorm(config.HiddenSize, config.RmsNormEps, config.DType);
Phi3\Phi3ForCasualLM.cs (1)
35this.lm_head = new GenAILinear(config.HiddenSize, config.VocabSize, dtype: config.DType, hasBias: false);