Skip to content

Commit 15c9f40

Browse files
Initial commit
1 parent 7823e81 commit 15c9f40

File tree

59 files changed

+239
-4846
lines changed

Some content is hidden

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

59 files changed

+239
-4846
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,6 @@ cython_debug/
160160
# and can be added to the global gitignore or merged into this file. For a more nuclear
161161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162162
#.idea/
163+
164+
data/
165+
images/

scripts/102424_execute_inference.sh

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,16 @@
11
#!/bin/bash
2-
#SBATCH -p gpu_long
3-
#SBATCH -c 4
4-
#SBATCH -t 100:00:00
5-
#SBATCH --gres=gpu:a6000:1
6-
#SBATCH --account=is-nlp
7-
#SBATCH --job-name=inference-llama3.1-instruct
8-
#SBATCH -o logs/slurm-%x-%j.log
9-
#SBATCH --nodelist=elm66
2+
set -eu
103

11-
project=/cl/home2/shintaro/rag-notebook/shintaro
4+
project=$(pwd)
125
source $project/.venv/bin/activate
136

14-
<< COMMENTOUT
15-
MODELS=("microsoft/Phi-3.5-mini-instruct" "axiong/PMC_LLaMA_13B" epfl-llm/meditron-70b meta-llama/Llama-3.1-70B meta-llama/Llama-2-70b-chat-hf meta-llama/Llama-3.1-8B
16-
task=("medqa" "medmcqa" "mmlu" "pubmed")
17-
COMMENTOUT
18-
197
inference_model=meta-llama/Llama-3.1-70B-Instruct
208
quantize_type=none
219
inference_max_length=2048
22-
2310
task=medmcqa
24-
time python $project/src/102424_execute_inference.py \
25-
--inference_model $inference_model \
26-
--task $task \
27-
--quantize_type $quantize_type \
28-
--inference_max_length $inference_max_length
29-
30-
task=mmlu
31-
time python $project/src/102424_execute_inference.py \
32-
--inference_model $inference_model \
33-
--task $task \
34-
--quantize_type $quantize_type \
35-
--inference_max_length $inference_max_length
36-
37-
task=pubmedqa
38-
time python $project/src/102424_execute_inference.py \
39-
--inference_model $inference_model \
40-
--task $task \
41-
--quantize_type $quantize_type \
42-
--inference_max_length $inference_max_length
4311

44-
task=medqa
4512
time python $project/src/102424_execute_inference.py \
4613
--inference_model $inference_model \
4714
--task $task \
4815
--quantize_type $quantize_type \
4916
--inference_max_length $inference_max_length
50-
51-
echo "Done"

scripts/102424_execute_inference_llama2.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

scripts/102424_execute_inference_sequential.sh

Lines changed: 0 additions & 123 deletions
This file was deleted.

scripts/102424_execute_inference_with_bm25.sh

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
#!/bin/bash
2-
#SBATCH -p gpu_long
3-
#SBATCH -c 4
4-
#SBATCH -t 100:00:00
5-
#SBATCH --gres=gpu:6000:1
6-
#SBATCH --account=is-nlp
7-
#SBATCH --job-name=inference-with-bm25
8-
#SBATCH -o logs/slurm-%x-%j.log
2+
set -eu
93

10-
project=/cl/home2/shintaro/rag-notebook/shintaro
4+
project=$(pwd)
115
source $project/.venv/bin/activate
126

13-
<< COMMENTOUT
14-
models: microsoft/Phi-3.5-mini-instruct, axiong/PMC_LLaMA_13B, meta-llama/Llama-3.1-70B, epfl-llm/meditron-70b
15-
RAG_MODELS=("ncbi/MedCPT-Query-Encoder" "intfloat/e5-base-v2" "facebook/contriever" "bm25")
16-
TASKS=("medqa" "medmcqa" "mmlu" "pubmedqa")
17-
RAGDB=("statpearls" "texatbooks" "pubmed" "wikipedia")
18-
COMMENTOUT
19-
207
inference_model=meta-llama/Llama-3.1-70B
21-
228
rag_db=statpearls
239
inference_max_length=2048
2410
quantize_type=4bit
25-
2611
task=mmlu
2712
rag_max_length=512
2813
top_k=1

0 commit comments

Comments
 (0)