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