interplane.Get Omega
Read in your language

MojoLlama

Archived Mojo/MAX quantizer and serving research repository (read-only history)

Brought by drakestapleton

branch main Branches Tags History

MojoLlama / src / mojollama / mojo_engine / build_batch.sh

18 lines · 584 bytes Raw Blame History
1#!/bin/bash
2set -e
3MOJO_LIB="$HOME/.local/share/uv/tools/mojo/lib/python3.11/site-packages/modular/lib"
4
5echo "=== Step 1: Mojo compile to object ==="
6mojo build tinyllama_gen_batch.mojo --emit object -o tinyllama_gen_batch.o
7
8echo "=== Step 2: Link with GCC ==="
9gcc -o tinyllama_gen_batch tinyllama_gen_batch.o \
10 -L"$MOJO_LIB" \
11 -lKGENCompilerRTShared \
12 -lAsyncRTRuntimeGlobals \
13 -lMSupportGlobals \
14 -lAsyncRTMojoBindings \
15 -lm -lpthread -ldl -lstdc++
16
17echo "=== Done: tinyllama_gen_batch ==="
18echo "Run: LD_LIBRARY_PATH=\"$MOJO_LIB\" ./tinyllama_gen_batch"