27 references to LlamaConfig
Microsoft.ML.GenAI.LLaMA (22)
LlamaConfig.cs (10)
52Llama3_1_8B_Instruct = JsonSerializer.Deserialize<LlamaConfig>(llama3_1_8b_content) ?? throw new ArgumentNullException(nameof(llama3_1_8b_content)); 53Llama3_1_70B_Instruct = JsonSerializer.Deserialize<LlamaConfig>(llama3_1_70b_content) ?? throw new ArgumentNullException(nameof(llama3_1_70b_content)); 54Llama3_1_405B_Instruct = JsonSerializer.Deserialize<LlamaConfig>(llama3_1_405b_content) ?? throw new ArgumentNullException(nameof(llama3_1_405b_content)); 55Llama3_2_1B_Instruct = JsonSerializer.Deserialize<LlamaConfig>(llama3_2_1b_content) ?? throw new ArgumentNullException(nameof(llama3_2_1b_content)); 56Llama_3_2_3B_Instruct = JsonSerializer.Deserialize<LlamaConfig>(llama3_2_3b_content) ?? throw new ArgumentNullException(nameof(llama3_2_3b_content)); 63public static LlamaConfig Llama3_1_8B_Instruct { get; } 68public static LlamaConfig Llama3_1_70B_Instruct { get; } 73public static LlamaConfig Llama3_1_405B_Instruct { get; } 78public static LlamaConfig Llama_3_2_3B_Instruct { get; } 83public static LlamaConfig Llama3_2_1B_Instruct { get; }
LlamaForCausalLM.cs (6)
19private readonly LlamaConfig _config; 27public LlamaForCausalLM(LlamaConfig config, string? device = null) 103var modelConfig = JsonSerializer.Deserialize<LlamaConfig>(File.ReadAllText(config)) ?? throw new ArgumentNullException(nameof(config)); 136var modelConfig = JsonSerializer.Deserialize<LlamaConfig>(File.ReadAllText(config)) ?? throw new ArgumentNullException(nameof(config));
Module\LlamaDecoderLayer.cs (3)
67private readonly LlamaConfig _llamaConfig; 82public LlamaDecoderLayer(LlamaConfig config, int layerIndex) 95private Attention CreateAttention(LlamaConfig config, int layerIndex)
Module\LlamaMLP.cs (1)
32public LlamaMLP(LlamaConfig config)
Module\LlamaModel.cs (2)
14private readonly LlamaConfig _config; 26public LlamaModel(LlamaConfig config, string? device = null)
Microsoft.ML.GenAI.LLaMA.Tests (5)
LLaMA3_1Tests.cs (3)
37var model = new LlamaForCausalLM(LlamaConfig.Llama3_1_8B_Instruct, "meta"); 47var model = new LlamaForCausalLM(LlamaConfig.Llama3_1_70B_Instruct, "meta"); 57var model = new LlamaForCausalLM(LlamaConfig.Llama3_1_405B_Instruct, "meta");
LLaMA3_2Tests.cs (2)
32var model = new LlamaForCausalLM(LlamaConfig.Llama3_2_1B_Instruct); 42var model = new LlamaForCausalLM(LlamaConfig.Llama_3_2_3B_Instruct);