Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ public AiModelDefinition() {
private float minP = AiGenerationConfig.DEFAULT_MIN_P;
private float topNSigma = AiGenerationConfig.DEFAULT_TOP_N_SIGMA;
private float repeatPenalty = AiGenerationConfig.DEFAULT_REPEAT_PENALTY;
private @Nullable Boolean chatTemplateEnableThinking =
AiGenerationConfig.DEFAULT_CHAT_TEMPLATE_ENABLE_THINKING;
private @Nullable Boolean chatTemplateEnableThinking = AiGenerationConfig.DEFAULT_CHAT_TEMPLATE_ENABLE_THINKING;
private boolean cachePrompt = AiGenerationConfig.DEFAULT_CACHE_PROMPT;
private boolean swaFull = AiGenerationConfig.DEFAULT_SWA_FULL;
private int cacheReuse = AiGenerationConfig.DEFAULT_CACHE_REUSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public String renderJson() {
appendJsonNumber(out, "decodeTokensPerSecond", FORMAT_TOKENS_PER_SECOND, m.decodeTokensPerSecond());
appendJsonNumber(out, "charsPerToken", FORMAT_CHARS_PER_TOKEN, m.charsPerToken());
appendJsonNumber(out, "midPrefillTokensPerSecond", FORMAT_TOKENS_PER_SECOND, m.midPrefillTokensPerSecond());
out.append(" \"cachedPromptTokens\": ").append(m.cachedPromptTokens()).append('\n');
out.append(" \"cachedPromptTokens\": ")
.append(m.cachedPromptTokens())
.append('\n');
out.append(" }");
out.append(i + 1 < measurements.size() ? ",\n" : "\n");
}
Expand Down Expand Up @@ -133,7 +135,9 @@ public String renderYaml() {
appendYamlNumber(out, "decodeTokensPerSecond", FORMAT_TOKENS_PER_SECOND, m.decodeTokensPerSecond());
appendYamlNumber(out, "charsPerToken", FORMAT_CHARS_PER_TOKEN, m.charsPerToken());
appendYamlNumber(out, "midPrefillTokensPerSecond", FORMAT_TOKENS_PER_SECOND, m.midPrefillTokensPerSecond());
out.append(" cachedPromptTokens: ").append(m.cachedPromptTokens()).append('\n');
out.append(" cachedPromptTokens: ")
.append(m.cachedPromptTokens())
.append('\n');
}
return out.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,7 @@ public static final class Builder {
private float minP = AiGenerationConfig.DEFAULT_MIN_P;
private float topNSigma = AiGenerationConfig.DEFAULT_TOP_N_SIGMA;
private float repeatPenalty = AiGenerationConfig.DEFAULT_REPEAT_PENALTY;
private @Nullable Boolean chatTemplateEnableThinking =
AiGenerationConfig.DEFAULT_CHAT_TEMPLATE_ENABLE_THINKING;
private @Nullable Boolean chatTemplateEnableThinking = AiGenerationConfig.DEFAULT_CHAT_TEMPLATE_ENABLE_THINKING;
private boolean cachePrompt = AiGenerationConfig.DEFAULT_CACHE_PROMPT;
private boolean swaFull = AiGenerationConfig.DEFAULT_SWA_FULL;
private int cacheReuse = AiGenerationConfig.DEFAULT_CACHE_REUSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ public void getConfig_defaultValues_matchAiGenerationConfigDefaults() {
assertThat(config.getCharsPerToken(), is(equalTo(AiGenerationConfig.DEFAULT_CHARS_PER_TOKEN)));
assertThat(config.getMaxInputChars(), is(equalTo(AiGenerationConfig.DEFAULT_MAX_INPUT_CHARS)));
assertThat(config.isWarnOnTrim(), is(AiGenerationConfig.DEFAULT_WARN_ON_TRIM));
assertThat(config.getChatTemplateEnableThinking(), is(AiGenerationConfig.DEFAULT_CHAT_TEMPLATE_ENABLE_THINKING));
assertThat(
config.getChatTemplateEnableThinking(), is(AiGenerationConfig.DEFAULT_CHAT_TEMPLATE_ENABLE_THINKING));
assertThat(config.isCachePrompt(), is(AiGenerationConfig.DEFAULT_CACHE_PROMPT));
assertThat(config.isSwaFull(), is(AiGenerationConfig.DEFAULT_SWA_FULL));
assertThat(config.getCacheReuse(), is(equalTo(AiGenerationConfig.DEFAULT_CACHE_REUSE)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ public void renderJson_twoModels_separatesEntriesWithACommaAndNoTrailingComma()
/** An empty run must still produce a parseable document, not a dangling array. */
@Test
public void renderJson_noModels_isAnEmptyArray() {
assertThat(new CalibrationReport(Collections.emptyList()).renderJson(), is(equalTo("{\n \"models\": []\n}\n")));
assertThat(
new CalibrationReport(Collections.emptyList()).renderJson(), is(equalTo("{\n \"models\": []\n}\n")));
}

@Test
Expand Down
Loading