54 lines
2 KiB
PHP
54 lines
2 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\BenchmarkRun;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/** @extends Factory<BenchmarkRun> */
|
|
class BenchmarkRunFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
$quant = $this->faker->randomElement(['Q4_K_M', 'Q5_K_M', 'Q6_K', 'Q8_0', 'fp8', 'none']);
|
|
|
|
return [
|
|
'run_id' => str()->random(12),
|
|
'ran_at' => $this->faker->dateTimeThisMonth(),
|
|
'suite' => $this->faker->randomElement(['softbench', 'infrabench', 'prosebench', 'psychbench']),
|
|
'run_key' => null,
|
|
'model_id' => $this->faker->randomElement([
|
|
'Qwen/Qwen3-8B', 'bartowski/Qwen3.8-27B-GGUF', 'meta-llama/Llama-3.3-70B',
|
|
]),
|
|
'model_quant' => $quant === 'none' ? null : $quant,
|
|
'model_quant_raw' => $quant === 'none' ? null : $quant,
|
|
'model_path' => null,
|
|
'engine' => $this->faker->randomElement(['llama.cpp', 'vllm', 'unknown']),
|
|
'engine_build' => 'b10711-9723942ad',
|
|
'n_ctx' => $this->faker->randomElement([32768, 65536, 131072]),
|
|
'slots' => 1,
|
|
'gpu' => $this->faker->randomElement(['unknown', 'RTX 4090', 'RX 7900 XTX']),
|
|
'gpu_count' => $this->faker->numberBetween(0, 2),
|
|
'gpu_source' => 'remote-endpoint',
|
|
'host' => null,
|
|
'client' => null,
|
|
'endpoint' => null,
|
|
'label' => $this->faker->optional()->word(),
|
|
'config' => null,
|
|
'image_digest' => 'quay.io/pch/festbench@sha256:'.str()->random(64),
|
|
'validators' => null,
|
|
'suite_versions' => null,
|
|
'harness' => 'direct',
|
|
'harness_ver' => null,
|
|
'harness_mode' => null,
|
|
'user_id' => null,
|
|
'visibility' => BenchmarkRun::VISIBILITY_PUBLIC,
|
|
'notes' => null,
|
|
];
|
|
}
|
|
|
|
public function private(): static
|
|
{
|
|
return $this->state(fn () => ['visibility' => BenchmarkRun::VISIBILITY_PRIVATE]);
|
|
}
|
|
}
|