inflaton commited on
Commit
6d673bc
1 Parent(s): 4a18348

fix bug for gemma2

Browse files
llm_toolkit/logical_reasoning_utils.py CHANGED
@@ -198,7 +198,7 @@ def load_logical_reasoning_dataset(
198
 
199
  model_name = os.getenv("MODEL_NAME")
200
 
201
- if "mistral" in model_name.lower():
202
  messages = messages[1:]
203
 
204
  texts = []
 
198
 
199
  model_name = os.getenv("MODEL_NAME")
200
 
201
+ if "mistral" in model_name.lower() or "gemma" in model_name.lower():
202
  messages = messages[1:]
203
 
204
  texts = []
scripts/tune-mgtv-gemma.sh ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ BASEDIR=$(dirname "$0")
4
+ cd $BASEDIR/..
5
+ echo Current Directory:
6
+ pwd
7
+
8
+ BASEDIR=`pwd`
9
+
10
+ nvidia-smi
11
+ uname -a
12
+ cat /etc/os-release
13
+ lscpu
14
+ grep MemTotal /proc/meminfo
15
+
16
+ # Installs Unsloth, Xformers (Flash Attention) and all other packages!
17
+ #pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
18
+
19
+ pip install unsloth[colab-new] file:///common2/dh.huang.2023/code/unsloth
20
+ pip install --no-deps "xformers<0.0.27" "trl<0.9.0" peft accelerate bitsandbytes
21
+
22
+ export LOGICAL_REASONING_DATA_PATH=datasets/mgtv
23
+ export LOGICAL_REASONING_RESULTS_PATH=results/mgtv-results_p2_gemma2.csv
24
+ export MODEL_NAME=google/gemma-2-9b-it
25
+
26
+ python llm_toolkit/tune_logical_reasoning.py
27
+
scripts/tune-mgtv.sh CHANGED
@@ -1 +1 @@
1
- tune-mgtv-llama3_8b_en.sh
 
1
+ tune-mgtv-gemma.sh