-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
55 lines (46 loc) · 1.82 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
var HOME = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
var command = "llama.cs:stories15M";
Console.WriteLine ($"Running {command}");
switch (command) {
case "llama.cs:stories-15m":
llama.cs.Entrypoint.main (
llama.cs.TokenizerType.llama_cs,
tokenizerModelPath: "resources/tokenizer.bin",
paramJsonPath: $"{HOME}/llama/stories15M/params.json",
modelWeightPath: $"{HOME}/llama/stories15M/stories15M.pth",
rng_seed: 1,
temperature: 0,
prompt: "");
break;
case "llama.cs:stories-15m.bin":
llama.cs.Entrypoint.main (
llama.cs.TokenizerType.llama_cs,
tokenizerModelPath: "resources/tokenizer.bin",
modelWeightPath: "resources/stories15M.bin",
rng_seed: 1,
prompt: "");
break;
case "llama.cs:llama-3.2-1b-instruct":
llama.cs.Entrypoint.main (
llama.cs.TokenizerType.llama_3,
paramJsonPath: $"{HOME}/llama/llama-3.2-1b-instruct/params.json",
modelWeightPath: $"{HOME}/llama/llama-3.2-1b-instruct/consolidated.00.pth",
tokenizerModelPath: $"{HOME}/llama/llama-3.2-1b-instruct/tokenizer.model",
rng_seed: 1,
temperature: 0,
prompt: "The meaning of life is ");
break;
case "llama.torchsharp:llama-3.2-1b-instruct":
llama.torchsharp.Entrypoint.run (
HOME + "/llama/llama-3.2-1b-instruct",
"llama.torchsharp/resources");
break;
case "llama.torchsharp:stories-15m":
llama.torchsharp.Entrypoint.run (
HOME + "/llama/stories15M",
"llama.torchsharp/resources"); // TODO
break;
default:
throw new NotSupportedException (command);
}
Console.WriteLine ("done");