Skip to content

Commit

Permalink
Upgrade to llama3.18b
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Aug 16, 2024
1 parent ffa618a commit 308b1f2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
5 changes: 3 additions & 2 deletions MyApp.ServiceInterface/Data/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public JsonApiClient CreateAiServerClient()
public HashSet<string> AllTags { get; set; } = [];
public List<ApplicationUser> ModelUsers { get; set; } = [];

public static string[] DeprecatedModels = ["deepseek-coder","gemma-2b","qwen-4b","deepseek-coder-33b","mistral"];
public static string[] DeprecatedModels = ["deepseek-coder","gemma-2b","qwen-4b","deepseek-coder-33b","mistral","llama3-8b"];

public static (string Model, int Questions)[] GetActiveModelsForQuestions(int questionsCount) =>
ModelsForQuestions.Where(x => questionsCount >= x.Questions && !DeprecatedModels.Contains(x.Model)).ToArray();
Expand All @@ -80,11 +80,12 @@ public static (string Model, int Questions)[] ModelsForQuestions =
("qwen-4b", -1),
("deepseek-coder-33b", -1),
("mistral", -1),
("llama3-8b", -1),

("phi", 0),
("codellama", 0),
("mistral-nemo", 0),
("llama3-8b", 0),
("llama3.1-8b", 0),
("gemma2-27b", 0),
("gemini-pro", 0),
("mixtral", 3),
Expand Down
29 changes: 25 additions & 4 deletions MyApp.Tests/Top1KQuestionTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ public async Task Recreate_answers_for_Top1K_questions_for_Mistral_Nemo()
[Test]
public async Task Recreate_answers_for_Top1K_questions_for_DeepSeekCoderV2()
{
// var client = await TestUtils.CreateAuthenticatedProdClientAsync();
var client = await TestUtils.CreateAuthenticatedDevClientAsync();
var client = await TestUtils.CreateAuthenticatedProdClientAsync();
// var client = await TestUtils.CreateAuthenticatedDevClientAsync();
var apiCreate = await client.ApiAsync(new CreateAnswersForModels
{
Models = ["deepseek-coder2-236b"],
PostIds = [9],
// PostIds = Migration1005.Top1KIds,
// PostIds = [9],
PostIds = Migration1005.Top1KIds,
});

apiCreate.Error.PrintDump();
Expand Down Expand Up @@ -287,6 +287,27 @@ public async Task Create_DeepSeek236B_User()
api.ThrowIfError();
}

[Test]
public async Task Create_Llama31_User()
{
var client = await TestUtils.CreateAdminDevClientAsync();
// var client = await TestUtils.CreateAdminProdClientAsync();
var api = await client.ApiAsync(new AdminCreateUser
{
UserName = "llama3.1-8b",
Email = "[email protected]",
UserAuthProperties = new()
{
[nameof(ApplicationUser.Model)] = "llama3.1:8b",
[nameof(ApplicationUser.DisplayName)] = "Llama 3.1 8B",
[nameof(ApplicationUser.ProfilePath)] = "/profiles/ll/llama3.1-8b/llama3.1-8b.svg",
},
Password = Environment.GetEnvironmentVariable("AUTH_SECRET"),
});
api.Response.PrintDump();
api.ThrowIfError();
}

[Test]
public async Task Generate_top_10k_answers_for_gemini_flash()
{
Expand Down
2 changes: 1 addition & 1 deletion MyApp/Components/Pages/Questions/Ask.razor
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{
<svg class="mt-2 mr-2 w-6 h-6 text-green-600 float-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2M9.29 16.29L5.7 12.7a.996.996 0 1 1 1.41-1.41L10 14.17l6.88-6.88a.996.996 0 1 1 1.41 1.41l-7.59 7.59a.996.996 0 0 1-1.41 0"/>
</svg>
</svg>
}

<ul role="list" class=@CssUtils.ClassNames("border-2 py-2 px-4 rounded", qualified ? "border-green-600" : "border-gray-200")>
Expand Down
10 changes: 10 additions & 0 deletions MyApp/Configure.Db.Migrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ await EnsureUserAsync(new ApplicationUser
Model = "llama3:8b", //8B
}, "p@55wOrd");

await EnsureUserAsync(new ApplicationUser
{
UserName = "llama3.1-8b",
Email = "[email protected]",
DisplayName = "Llama 3.1 8B",
EmailConfirmed = true,
ProfilePath = "/profiles/ll/llama3.1-8b/llama3.1-8b.svg",
Model = "llama3.1:8b", //8B
}, "p@55wOrd");

await EnsureUserAsync(new ApplicationUser
{
UserName = "llama3-70b",
Expand Down

0 comments on commit 308b1f2

Please sign in to comment.