-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (32 loc) · 860 Bytes
/
Makefile
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
.PHONY: init format check requirements single-run multi-run
TYPE ?= cross-encoder
MODEL_NAME ?= sigridjineth/ko-reranker-v1.1
MODEL_CLASS ?= huggingface
DATATYPE_NAME ?= AutoRAG
NPROC ?= 8
init:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
. .venv/bin/activate
uv sync
format:
uvx ruff format
check:
uvx ruff check --fix
requirements:
uv export -o requirements.txt
run:
@echo "Running with uv..."
uv run ./retriever-simple-benchmark/main.py \
--type $(TYPE) \
--model_name "$(MODEL_NAME)" \
--model_class $(MODEL_CLASS) \
--datatype_name $(DATATYPE_NAME)
torchrun:
@echo "Running with torchrun..."
. .venv/bin/activate
torchrun --nproc_per_node=$(NPROC) ./retriever-simple-benchmark/main.py \
--type $(TYPE) \
--model_name "$(MODEL_NAME)" \
--model_class $(MODEL_CLASS) \
--datatype_name $(DATATYPE_NAME)