From ad001dae84858c97dd1a6dae5c550be506b5252a Mon Sep 17 00:00:00 2001 From: extio-de Date: Sun, 29 Dec 2024 12:05:15 +0100 Subject: [PATCH] Misc improvements; --- src/main/java/de/extio/lmdatasetprep/Execution.java | 12 ++++++------ src/main/resources/application.properties | 2 +- src/main/resources/gemma.properties | 11 +++++++++++ src/main/resources/llama3-cold.properties | 2 +- src/main/resources/llama3-hot.properties | 2 +- 5 files changed, 20 insertions(+), 9 deletions(-) create mode 100755 src/main/resources/gemma.properties diff --git a/src/main/java/de/extio/lmdatasetprep/Execution.java b/src/main/java/de/extio/lmdatasetprep/Execution.java index 03c182a..ad53b98 100644 --- a/src/main/java/de/extio/lmdatasetprep/Execution.java +++ b/src/main/java/de/extio/lmdatasetprep/Execution.java @@ -161,7 +161,7 @@ public class Execution { } public static void streamOut(final Path f, final String propertyPrefix, final Properties properties, final Consumer consumer) { - final var streamFuncs = new ArrayList(); + final var streamFuncs = new ArrayList(); for (int i = 0; i < 2; i++) { final var destination = properties.getProperty(propertyPrefix + "." + i); if (destination != null) { @@ -197,8 +197,8 @@ public class Execution { } - private static OutStream setupStreamOutToFile(final Path f, final String destination) { - return new OutStream(() -> { + private static StreamFunc setupStreamOutToFile(final Path f, final String destination) { + return new StreamFunc(() -> { final var out = Path.of(destination).resolve(f); if (Files.exists(out)) { LOGGER.info("File already exists: {} ", out); @@ -226,8 +226,8 @@ public class Execution { }); } - private static OutStream setupStreamOutToQueue(final Path f, final String destination) { - return new OutStream(() -> { + private static StreamFunc setupStreamOutToQueue(final Path f, final String destination) { + return new StreamFunc(() -> { return new ByteArrayOutputStream(); }, (stream) -> { @@ -239,7 +239,7 @@ public class Execution { public record WorkPacket(Path file, String text) { } - private record OutStream(Supplier open, Consumer afterClose) { + private record StreamFunc(Supplier open, Consumer afterClose) { } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e0ef2e9..9ba4467 100755 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,7 +4,7 @@ logging.level.de.extio=info profile.model.s=llama3-cold profile.model.m=mistral-cold -profile.model.l=chatml-cold +profile.model.l=gemma profile.model.hot=llama3-hot profile.model.cold=alpaca-cold diff --git a/src/main/resources/gemma.properties b/src/main/resources/gemma.properties new file mode 100755 index 0000000..9d9cb60 --- /dev/null +++ b/src/main/resources/gemma.properties @@ -0,0 +1,11 @@ +prompts=gemma2 +tokenEncoding= +maxTokens=2000 +maxContextLength=4000 +temperature=0.5 +topP=1.0 +maxContinuations=1 +modelProvider=OAI_TEXT_COMPLETION +modelName= +url=http://localhost:5001 +apiKey= diff --git a/src/main/resources/llama3-cold.properties b/src/main/resources/llama3-cold.properties index 866ebcf..e1a458c 100755 --- a/src/main/resources/llama3-cold.properties +++ b/src/main/resources/llama3-cold.properties @@ -2,7 +2,7 @@ prompts=llama3 tokenEncoding= maxTokens=2000 maxContextLength=4000 -temperature=0.2 +temperature=0.3 topP=1.0 maxContinuations=1 modelProvider=OAI_TEXT_COMPLETION diff --git a/src/main/resources/llama3-hot.properties b/src/main/resources/llama3-hot.properties index 3670231..4f1186c 100755 --- a/src/main/resources/llama3-hot.properties +++ b/src/main/resources/llama3-hot.properties @@ -2,7 +2,7 @@ prompts=llama3 tokenEncoding= maxTokens=2000 maxContextLength=4000 -temperature=0.4 +temperature=0.7 topP=1.0 maxContinuations=1 modelProvider=OAI_TEXT_COMPLETION