The Limit of LLMs with paraphrased style difference
setup:
cd /scratch_root/ifc24 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b -p /scratch_root/ifc24/conda source /scratch_root/ifc24/conda/etc/profile.d/conda.sh unset PYTHONPATH conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r conda create -y -p /scratch_root/ifc24/envs/paraphrx python=3.12 httpx tqdm conda activate /scratch_root/ifc24/envs/paraphrx
reuse it now: source /scratch_root/ifc24/conda/etc/profile.d/conda.sh conda activate /scratch_root/ifc24/envs/paraphrx
Initial data from: https://huggingface.co/datasets/tatsu-lab/alpaca
Too much content - moved over to categories.md!
Generating different versions with gemini-2.5
Test file: politeness, with 5 levels
Generating the output with for every type of instructions:
python c_assess_inf/src/run_inference.py \
b_tests/data/alpaca_10_politeness.json \
c_assess_inf/output/results_test.json \
--model google/gemma-2b-it \
--temperature 0 \
--max_tokens 256
{
"is_correct": boolean, // Did the answer fully satisfy the instruction?
"score_0_to_5": integer, // 0 = useless, 5 = perfect
"explanation": string // 1-2 sentence rationale
}
-> Produces one JSON object per record whose keys follow the pattern
<PARAPHRASE_KEY>_eval.
sudo apt-get update -qq && sudo apt-get install -y build-essential git
python -m pip install "transformers[torch]==4.42.1" accelerate tqdm
python -m pip install bitsandbytes==0.43.0 flash-attn --no-build-isolation
pip uninstall -y transformer-lens
mkdir logs
mkdir -p c_assess_inf/output/alpaca_prxed/gemma-2-9b-it
nohup python c_assess_inf/src/inference_run_sped_3.py \
a_data/alpaca/slice_500/context.json \
c_assess_inf/output/alpaca_prxed/gemma-2-9b-it/context.json \
--model google/gemma-2-9b-it \
--batch 128 \
--max_tokens 128 \
--temperature 0 \
--device auto \
--quant 4bit \
--log_every 200 \
--type context \
>"$LOGFILE" 2>&1 < /dev/null &
LOGFILE="logs/context_$(date +%F_%H-%M-%S).log"
nohup env DISABLE_FLASH_ATTN=1 HF_TOKEN=HF_TOKEN \
python c_assess_inf/src/inference_run_sped_3.py \
a_data/alpaca/slice_500/context.json \
c_assess_inf/output/alpaca_prxed/gemma-2-9b-it/context.json \
--model google/gemma-2-9b-it \
--batch 128 \
--max_tokens 128 \
--temperature 0 \
--device auto \
--quant 4bit \
--log_every 50 \
--type context \
>"$LOGFILE" 2>&1 < /dev/null &
Python
60.4%
Shell
28.7%
Rust
9.9%
The Limit of LLMs with paraphrased style difference
setup:
cd /scratch_root/ifc24 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b -p /scratch_root/ifc24/conda source /scratch_root/ifc24/conda/etc/profile.d/conda.sh unset PYTHONPATH conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r conda create -y -p /scratch_root/ifc24/envs/paraphrx python=3.12 httpx tqdm conda activate /scratch_root/ifc24/envs/paraphrx
reuse it now: source /scratch_root/ifc24/conda/etc/profile.d/conda.sh conda activate /scratch_root/ifc24/envs/paraphrx
Initial data from: https://huggingface.co/datasets/tatsu-lab/alpaca
Too much content - moved over to categories.md!
Generating different versions with gemini-2.5
Test file: politeness, with 5 levels
Generating the output with for every type of instructions:
python c_assess_inf/src/run_inference.py \
b_tests/data/alpaca_10_politeness.json \
c_assess_inf/output/results_test.json \
--model google/gemma-2b-it \
--temperature 0 \
--max_tokens 256
{
"is_correct": boolean, // Did the answer fully satisfy the instruction?
"score_0_to_5": integer, // 0 = useless, 5 = perfect
"explanation": string // 1-2 sentence rationale
}
-> Produces one JSON object per record whose keys follow the pattern
<PARAPHRASE_KEY>_eval.
sudo apt-get update -qq && sudo apt-get install -y build-essential git
python -m pip install "transformers[torch]==4.42.1" accelerate tqdm
python -m pip install bitsandbytes==0.43.0 flash-attn --no-build-isolation
pip uninstall -y transformer-lens
mkdir logs
mkdir -p c_assess_inf/output/alpaca_prxed/gemma-2-9b-it
nohup python c_assess_inf/src/inference_run_sped_3.py \
a_data/alpaca/slice_500/context.json \
c_assess_inf/output/alpaca_prxed/gemma-2-9b-it/context.json \
--model google/gemma-2-9b-it \
--batch 128 \
--max_tokens 128 \
--temperature 0 \
--device auto \
--quant 4bit \
--log_every 200 \
--type context \
>"$LOGFILE" 2>&1 < /dev/null &
LOGFILE="logs/context_$(date +%F_%H-%M-%S).log"
nohup env DISABLE_FLASH_ATTN=1 HF_TOKEN=HF_TOKEN \
python c_assess_inf/src/inference_run_sped_3.py \
a_data/alpaca/slice_500/context.json \
c_assess_inf/output/alpaca_prxed/gemma-2-9b-it/context.json \
--model google/gemma-2-9b-it \
--batch 128 \
--max_tokens 128 \
--temperature 0 \
--device auto \
--quant 4bit \
--log_every 50 \
--type context \
>"$LOGFILE" 2>&1 < /dev/null &
Python
60.4%
Shell
28.7%
Rust
9.9%