ai-speedometer-headless 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -754,6 +754,7 @@ async function benchmarkSingleModelRest(model, logger) {
|
|
|
754
754
|
const finalInputTokens = inputTokens || Math.round(TEST_PROMPT.length / 4);
|
|
755
755
|
const totalTokens = finalInputTokens + finalOutputTokens;
|
|
756
756
|
const tokensPerSecond = generationTime > 0 ? finalOutputTokens / generationTime * 1000 : 0;
|
|
757
|
+
const f1000 = tokensPerSecond > 0 ? 1000 * (timeToFirstToken / 1000 + 300 / tokensPerSecond) / 3600 : Infinity;
|
|
757
758
|
return {
|
|
758
759
|
model: model.name,
|
|
759
760
|
provider: model.providerName,
|
|
@@ -761,6 +762,7 @@ async function benchmarkSingleModelRest(model, logger) {
|
|
|
761
762
|
timeToFirstToken,
|
|
762
763
|
tokenCount: finalOutputTokens,
|
|
763
764
|
tokensPerSecond,
|
|
765
|
+
f1000,
|
|
764
766
|
promptTokens: finalInputTokens,
|
|
765
767
|
totalTokens,
|
|
766
768
|
usedEstimateForOutput,
|
|
@@ -776,6 +778,7 @@ async function benchmarkSingleModelRest(model, logger) {
|
|
|
776
778
|
timeToFirstToken: 0,
|
|
777
779
|
tokenCount: 0,
|
|
778
780
|
tokensPerSecond: 0,
|
|
781
|
+
f1000: Infinity,
|
|
779
782
|
promptTokens: 0,
|
|
780
783
|
totalTokens: 0,
|
|
781
784
|
usedEstimateForOutput: true,
|
|
@@ -836,6 +839,8 @@ function buildJsonOutput(providerName, providerId, modelName, modelId, result, f
|
|
|
836
839
|
timeToFirstToken: result.timeToFirstToken,
|
|
837
840
|
timeToFirstTokenSeconds: result.timeToFirstToken / 1000,
|
|
838
841
|
tokensPerSecond: result.tokensPerSecond,
|
|
842
|
+
f1000: result.f1000,
|
|
843
|
+
f1000Hours: result.f1000 === Infinity ? null : result.f1000,
|
|
839
844
|
outputTokens: result.tokenCount,
|
|
840
845
|
promptTokens: result.promptTokens,
|
|
841
846
|
totalTokens: result.totalTokens,
|
package/package.json
CHANGED