Browse Source

debug

pull/720/head
Rinne 2 years ago
parent
commit
dcb5cb6580
3 changed files with 4 additions and 2 deletions
  1. +1
    -0
      .github/workflows/benchmark.yml
  2. +2
    -1
      LLama.Benchmark/LLamaExecutorBenchmark/Prefill.cs
  3. +1
    -1
      LLama.Benchmark/Program.cs

+ 1
- 0
.github/workflows/benchmark.yml View File

@@ -51,6 +51,7 @@ jobs:
with:
dotnet-version: |
8.0.x
no-cdn: true

- name: Prepare models
run: |


+ 2
- 1
LLama.Benchmark/LLamaExecutorBenchmark/Prefill.cs View File

@@ -81,13 +81,14 @@ namespace LLama.Benchmark.LLamaExecutorBenchmark
ContextSize = PromptAndContextLength.Item2,
GpuLayerCount = ModelAndGpuLayerCount.Item2
};
Console.WriteLine($"************ model params model path: {ModelParams.ModelPath} specified path: {ModelAndGpuLayerCount.Item1}, prefix: {Constants.ModelDir}");
Prompt = File.ReadAllText(Constants.TextCompletionPromptsFilePath).Substring(0, PromptAndContextLength.Item1);
InferenceParams = new InferenceParams()
{
Temperature = 0.6f,
MaxTokens = 1 // Only prefill, no generation here.
};
LLamaWeights weights = LLamaWeights.LoadFromFile(ModelParams);
LLamaContext context = weights.CreateContext(ModelParams);
Executor = ExecutorType switch


+ 1
- 1
LLama.Benchmark/Program.cs View File

@@ -11,7 +11,7 @@ namespace LLama.Benchmark
{
var modelDir = args[0];
Constants.ModelDir = modelDir;
Console.WriteLine($"#################### model dir: {modelDir}");
Console.WriteLine($"#################### model dir: {Constants.ModelDir}");
}

var summary = BenchmarkRunner.Run(typeof(Program).Assembly);


Loading…
Cancel
Save