3 writes to DType
Microsoft.ML.GenAI.LLaMA (3)
LlamaConfig.cs (1)
39this.DType = torch.ScalarType.BFloat16;
LlamaForCausalLM.cs (2)
104modelConfig.DType = torchDtype; 137modelConfig.DType = torchDtype;
10 references to DType
Microsoft.ML.GenAI.LLaMA (10)
LlamaForCausalLM.cs (2)
41lm_head = nn.Linear(config.HiddenSize, config.VocabSize, hasBias: false, dtype: config.DType); 45lm_head = nn.Linear(config.HiddenSize, config.VocabSize, hasBias: false, dtype: config.DType);
Module\LlamaDecoderLayer.cs (3)
91this.input_layernorm = new Core.RMSNorm(this._hiddenSize, eps: config.RmsNormEps, config.DType); 92this.post_attention_layernorm = new Core.RMSNorm(this._hiddenSize, eps: config.RmsNormEps, config.DType); 109dtype: config.DType,
Module\LlamaMLP.cs (3)
40this.gate_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: this._hasBias, dtype: config.DType); 41this.up_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: this._hasBias, dtype: config.DType); 42this.down_proj = new QuantizedLinear(this._intermediateSize, this._hiddenSize, hasBias: this._hasBias, dtype: config.DType);
Module\LlamaModel.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);