3 writes to DType
Microsoft.ML.GenAI.Mistral (3)
MistralConfig.cs (1)
33this.DType = torch.ScalarType.BFloat16;
MistralForCausalLM.cs (2)
59modelConfig.DType = torchDtype; 87modelConfig.DType = torchDtype;
8 references to DType
Microsoft.ML.GenAI.Mistral (8)
MistralDecoderLayer.cs (3)
85this.input_layernorm = new Core.RMSNorm(this._hiddenSize, eps: config.RmsNormEps, config.DType); 86this.post_attention_layernorm = new Core.RMSNorm(this._hiddenSize, eps: config.RmsNormEps, config.DType); 103dtype: config.DType,
MistralMLP.cs (3)
29this.gate_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: false, dtype: config.DType); 30this.up_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: false, dtype: config.DType); 31this.down_proj = new QuantizedLinear(this._intermediateSize, this._hiddenSize, hasBias: false, dtype: config.DType);
MistralModel.cs (2)
33this.embed_tokens = nn.Embedding(config.VocabSize, config.HiddenSize, padding_idx: this._paddingIdx, dtype: config.DType); 40this.norm = new RMSNorm(config.HiddenSize, config.RmsNormEps, config.DType);