Skip to content

Commit 85f1875

Browse files
authored
Merge pull request #42 from mikepapadim/refactor-packages
Reorganize package structure and update imports to use `org.beehive.g…
2 parents d60d9ea + fb7ab86 commit 85f1875

File tree

78 files changed

+362
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+362
-370
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ llama-tornado --gpu --model beehive-llama-3.2-1b-instruct-fp16.gguf --prompt "te
209209
@/home/mikepapadim/manchester/TornadoVM/bin/sdk/etc/exportLists/opencl-exports \
210210
--add-modules ALL-SYSTEM,tornado.runtime,tornado.annotation,tornado.drivers.common,tornado.drivers.opencl \
211211
-cp /home/mikepapadim/repos/gpu-llama3.java/target/gpu-llama3-1.0-SNAPSHOT.jar \
212-
com.example.LlamaApp \
212+
org.beehive.gpullama3.LlamaApp \
213213
-m beehive-llama-3.2-1b-instruct-fp16.gguf \
214214
--temperature 0.1 \
215215
--top-p 0.95 \

llama-tornado

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class LlamaRunner:
172172
[
173173
"-cp",
174174
f"{self.llama_root}/target/gpu-llama3-1.0-SNAPSHOT.jar",
175-
"com.example.LlamaApp",
175+
"org.beehive.gpullama3.LlamaApp",
176176
]
177177
)
178178
cmd.extend(module_config)

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>com.example</groupId>
7+
<groupId>org.beehive.gpullama3</groupId>
88
<artifactId>gpu-llama3</artifactId>
99
<version>1.0-SNAPSHOT</version>
1010

@@ -61,7 +61,7 @@
6161
<configuration>
6262
<transformers>
6363
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
64-
<mainClass>com.example.LlamaApp</mainClass>
64+
<mainClass>org.beehive.gpullama3.LlamaApp</mainClass>
6565
</transformer>
6666
</transformers>
6767
</configuration>

src/main/java/com/example/LlamaApp.java renamed to src/main/java/org/beehive/gpullama3/LlamaApp.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package com.example;
1+
package org.beehive.gpullama3;
22

3-
import com.example.aot.AOT;
4-
import com.example.core.model.tensor.FloatTensor;
5-
import com.example.inference.sampler.CategoricalSampler;
6-
import com.example.inference.sampler.Sampler;
7-
import com.example.inference.sampler.ToppSampler;
8-
import com.example.model.loader.ModelLoader;
9-
import com.example.model.Model;
10-
import com.example.tornadovm.FloatArrayUtils;
3+
import org.beehive.gpullama3.aot.AOT;
4+
import org.beehive.gpullama3.core.model.tensor.FloatTensor;
5+
import org.beehive.gpullama3.inference.sampler.CategoricalSampler;
6+
import org.beehive.gpullama3.inference.sampler.Sampler;
7+
import org.beehive.gpullama3.inference.sampler.ToppSampler;
8+
import org.beehive.gpullama3.model.loader.ModelLoader;
9+
import org.beehive.gpullama3.model.Model;
10+
import org.beehive.gpullama3.tornadovm.FloatArrayUtils;
1111
import uk.ac.manchester.tornado.api.types.arrays.FloatArray;
1212

1313
import java.io.IOException;

src/main/java/com/example/Options.java renamed to src/main/java/org/beehive/gpullama3/Options.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example;
1+
package org.beehive.gpullama3;
22

33
import java.io.PrintStream;
44
import java.nio.file.Path;

src/main/java/com/example/aot/AOT.java renamed to src/main/java/org/beehive/gpullama3/aot/AOT.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
package com.example.aot;
1+
package org.beehive.gpullama3.aot;
22

3-
import com.example.auxiliary.Timer;
4-
import com.example.core.model.GGUF;
5-
import com.example.core.model.tensor.GGMLTensorEntry;
6-
import com.example.model.loader.LlamaModelLoader;
7-
import com.example.model.Model;
8-
import com.example.Options;
9-
import com.example.model.format.LlamaChatFormat;
10-
import com.example.model.llama.Llama;
11-
import com.example.inference.weights.Weights;
12-
import com.example.tokenizer.impl.LlamaTokenizer;
3+
import org.beehive.gpullama3.auxiliary.Timer;
4+
import org.beehive.gpullama3.core.model.GGUF;
5+
import org.beehive.gpullama3.core.model.tensor.GGMLTensorEntry;
6+
import org.beehive.gpullama3.model.loader.LlamaModelLoader;
7+
import org.beehive.gpullama3.model.Model;
8+
import org.beehive.gpullama3.Options;
9+
import org.beehive.gpullama3.model.format.LlamaChatFormat;
10+
import org.beehive.gpullama3.model.llama.Llama;
11+
import org.beehive.gpullama3.inference.weights.Weights;
12+
import org.beehive.gpullama3.tokenizer.impl.LlamaTokenizer;
1313

1414
import java.io.IOException;
1515
import java.nio.channels.FileChannel;

src/main/java/com/example/auxiliary/LastRunMetrics.java renamed to src/main/java/org/beehive/gpullama3/auxiliary/LastRunMetrics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.auxiliary;
1+
package org.beehive.gpullama3.auxiliary;
22

33
/**
44
* Record to store metrics from the last model run.

src/main/java/com/example/auxiliary/Parallel.java renamed to src/main/java/org/beehive/gpullama3/auxiliary/Parallel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.auxiliary;
1+
package org.beehive.gpullama3.auxiliary;
22

33
import java.util.function.IntConsumer;
44
import java.util.function.LongConsumer;

src/main/java/com/example/auxiliary/Timer.java renamed to src/main/java/org/beehive/gpullama3/auxiliary/Timer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.auxiliary;
1+
package org.beehive.gpullama3.auxiliary;
22

33
import java.util.concurrent.TimeUnit;
44

src/main/java/com/example/auxiliary/Tuple2.java renamed to src/main/java/org/beehive/gpullama3/auxiliary/Tuple2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.auxiliary;
1+
package org.beehive.gpullama3.auxiliary;
22

33
public class Tuple2<T, U> {
44
private final T first;

0 commit comments

Comments
 (0)