Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (58 loc) · 1.69 KB
/
Copy pathMakefile
File metadata and controls
78 lines (58 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.PHONY: build release test check clean fmt lint demos
# Build
build:
cargo build --workspace
release:
cargo build --release -p larql-cli
# Test
test:
cargo test --workspace
# Check (compile without building)
check:
cargo check --workspace
# Code quality
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
lint:
cargo clippy --workspace --tests -- -D warnings
# All quality checks
ci: fmt-check lint test
# Clean
clean:
cargo clean
# Demos
demos:
cargo run --release -p larql-models --example architecture_demo
cargo run --release -p larql-core --example graph_demo
cargo run --release -p larql-core --example edge_demo
cargo run --release -p larql-core --example serialization_demo
cargo run --release -p larql-core --example algorithm_demo
demos-inference:
cargo run --release -p larql-inference --example inference_demo
# Benchmarks
bench: bench-core
bench-core:
cargo run --release -p larql-core --example bench_graph
bench-inference:
cargo run --release -p larql-inference --example bench_inference
bench-all: bench-core bench-inference
# Python extension (requires virtualenv)
python-build:
cd crates/larql-python && maturin develop --release
python-check:
cargo check -p larql-python
# Extraction
extract-test:
cargo run --release -p larql-cli -- weight-extract google/gemma-3-4b-it \
--layer 26 -o output/test-L26.larql.json \
--stats output/test-L26-stats.json
extract-full:
cargo run --release -p larql-cli -- weight-extract google/gemma-3-4b-it \
-o output/gemma-3-4b-knowledge.larql.json \
--stats output/gemma-3-4b-stats.json
# Inference
predict:
cargo run --release -p larql-cli -- predict google/gemma-3-4b-it \
--prompt "The capital of France is" -k 10