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
6 changes: 6 additions & 0 deletions llama-tornado
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class LlamaRunner:
if args.use_gpu:
cmd.append("-Duse.tornadovm=true")

if args.verbose_init:
cmd.append("-Dllama.EnableTimingForTornadoVMInit=true")

# Debug options
debug_config = []

Expand Down Expand Up @@ -289,6 +292,9 @@ def create_parser() -> argparse.ArgumentParser:
help="Print kernel information (tornado.printKernel=true)")
verbose_group.add_argument("--full-dump", dest="full_dump", action="store_true",
help="Enable full debug dump (tornado.fullDebug=true)")
verbose_group.add_argument("--verbose-init", dest="verbose_init", action="store_true",
help="Enable timers for TornadoVM initialization (llama.EnableTimingForTornadoVMInit=true)")


# Command display options
command_group = parser.add_argument_group("Command Display Options")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/loader/weights/ModelLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static Weights loadWeights(Map<String, GGMLTensorEntry> tensorEntries, Co
GGMLTensorEntry outputWeight = tensorEntries.getOrDefault("output.weight", tokenEmbeddings);

if (LlamaApp.USE_TORNADOVM) {
System.out.println("Loading weights in TornadoVM format");
System.out.println("Loading model weights in TornadoVM format (converting " + outputWeight.ggmlType() + " -> " + GGMLType.F16 + ")");
return createTornadoVMWeights(tensorEntries, config, ropeFreqs, tokenEmbeddings, outputWeight);
} else {
return createStandardWeights(tensorEntries, config, ropeFreqs, tokenEmbeddings, outputWeight);
Expand Down
Loading