Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly run model training on 1 RTX4090 graphics card? #203

Open
witold-gren opened this issue Aug 13, 2024 · 20 comments
Open

How to properly run model training on 1 RTX4090 graphics card? #203

witold-gren opened this issue Aug 13, 2024 · 20 comments
Labels
bug Something isn't working

Comments

@witold-gren
Copy link
Contributor

witold-gren commented Aug 13, 2024

Hey @acon96, It seems to me that this is not a bug, but an incorrect configuration. I try to run train.py script with some params, on my 1 x RTX4090 graphic card. I try to train llama-3.1-8B models with polish dataset. All command you can find below:

Generate data:

python3 generate_home_assistant_data.py --train --test --sample --xl --sharegpt --language polish

Run trains script:

#!/bin/bash
set -e
source "./home-llm/.train_data/bin/activate"

LLM_MODEL_NAME="home-llama-3.1-8b-polish"
LLM_MODEL="NousResearch/Meta-Llama-3.1-8B-Instruct"

# Example models for train:
# NousResearch/Meta-Llama-3.1-8B-Instruct
# speakleash/Bielik-7B-Instruct-v0.1
# OPI-PG/Qra-7b
# OPI-PG/Qra-1b
# OPI-PG/Qra-13b

TRAIN_DATASET="./home-llm/data/train_test_sample_xl_sharegpt_polish/home_assistant_train.jsonl"
TEST_DATASET="./home-llm/data/train_test_sample_xl_sharegpt_polish/home_assistant_test.jsonl"

python3 ./home-llm/train.py --run_name $LLM_MODEL_NAME \
	--base_model $LLM_MODEL \
	--train_dataset $TRAIN_DATASET \
	--test_dataset $TEST_DATASET \
	--bf16 \
	--batch_size 8 \
	--micro_batch_size 2 \
	--epochs 2 \
	--gradient_checkpointing \
	--group_by_length \
	--ctx_size 2048 \
	--save_steps 50 \
	--save_total_limit 20 \
	--eval_steps 25 \
	--logging_steps 5 \
	--use_lora \
	--lora_rank 8 \
	--lora_alpha 32 \
	--lora_modules up_proj,down_proj,q_proj,v_proj,o_proj \
	--lora_merge

sudo shutdown -h now

Describe the bug
I use LoRA to run bigger model on my card. I don't really know where the problem is so that I can train such a model. I don't really know how to set the indicated parameters, I relied on your examples to try to get it working. I run models 1B and 3B without LoRA and they can fit in the VRAM of the graphics card. Could you help me how to set the indicated parameters so that I can train such a model?

Expected behavior
I would expect that after running this command and waiting a few hours I would receive a new model :)

Logs

Loading model 'NousResearch/Meta-Llama-3.1-8B-Instruct'...
Model will target using 23000MiB of VRAM on GPU 0
config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 855/855 [00:00<00:00, 9.83MB/s]
model.safetensors.index.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23.9k/23.9k [00:00<00:00, 7.71MB/s]
model-00001-of-00004.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.98G/4.98G [01:08<00:00, 73.1MB/s]
model-00002-of-00004.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5.00G/5.00G [01:06<00:00, 74.8MB/s]
model-00003-of-00004.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [01:05<00:00, 75.4MB/s]
model-00004-of-00004.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.17G/1.17G [00:15<00:00, 75.1MB/s]
Downloading shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:37<00:00, 54.25s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:01<00:00,  2.63it/s]
generation_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 184/184 [00:00<00:00, 2.00MB/s]
tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 50.9k/50.9k [00:00<00:00, 5.55MB/s]
tokenizer.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9.09M/9.09M [00:00<00:00, 29.8MB/s]
special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 296/296 [00:00<00:00, 4.74MB/s]
Creating LoRA for model...
trainable params: 14,942,208 || all params: 8,045,203,456 || trainable%: 0.1857
/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/training_args.py:1525: FutureWarning: `evaluation_strategy` is deprecated and will be removed in version 4.46 of 🤗 Transformers. Use `eval_strategy` instead
  warnings.warn(
Loading dataset...
Generating train split: 54458 examples [00:00, 380876.91 examples/s]
Generating test split: 2499 examples [00:00, 437771.61 examples/s]
Tokenizing datasets...
Map (num_proc=32): 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 54458/54458 [00:02<00:00, 23949.41 examples/s]
Map (num_proc=32): 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2499/2499 [00:00<00:00, 8774.55 examples/s]
Train dataset has 47M tokens. Longest Example: 1598 tokens
Using auto half precision backend
***** Running training *****
  Num examples = 54,458
  Num Epochs = 2
  Instantaneous batch size per device = 2
  Total train batch size (w. parallel, distributed & accumulation) = 8
  Gradient Accumulation steps = 4
  Total optimization steps = 13,614
  Number of trainable parameters = 14,942,208
  0%|                                                                                                                                                                                                                                | 0/13614 [00:00<?, ?it/s]/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py:600: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.
  return fn(*args, **kwargs)
/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/utils/checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
  with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs):  # type: ignore[attr-defined]
{'loss': 0.0, 'grad_norm': 0.00011417888890719041, 'learning_rate': 9.99999748337735e-06, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 2.5291515157732647e-06, 'learning_rate': 9.999989933511934e-06, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 5.04565832670778e-07, 'learning_rate': 9.999977350411352e-06, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 8.23315804154845e-06, 'learning_rate': 9.999959734088268e-06, 'epoch': 0.0}
{'loss': 0.0, 'grad_norm': 3.7266798358359665e-07, 'learning_rate': 9.999937084560419e-06, 'epoch': 0.0}
  0%|▍                                                                                                                                                                                                                   | 25/13614 [01:49<13:26:12,  3.56s/it]
***** Running Evaluation *****
  Num examples = 2499
  Batch size = 8
Something bad happened! Try and save it?
Traceback (most recent call last):
  File "/home/witold/ML/llm/./home-llm/train.py", line 735, in <module>
    trainer.train()
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 1938, in train
    return inner_training_loop(
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 2356, in _inner_training_loop
    self._maybe_log_save_evaluate(tr_loss, grad_norm, model, trial, epoch, ignore_keys_for_eval)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 2804, in _maybe_log_save_evaluate
    metrics = self._evaluate(trial, ignore_keys_for_eval)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 2761, in _evaluate
    metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 3666, in evaluate
    output = eval_loop(
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 3857, in evaluation_loop
    losses, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 4075, in prediction_step
    loss, outputs = self.compute_loss(model, inputs, return_outputs=True)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/trainer.py", line 3363, in compute_loss
    outputs = model(**inputs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/accelerate/utils/operations.py", line 819, in forward
    return model_forward(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/accelerate/utils/operations.py", line 807, in __call__
    return convert_to_fp32(self.model_forward(*args, **kwargs))
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/amp/autocast_mode.py", line 43, in decorate_autocast
    return func(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/peft/peft_model.py", line 1577, in forward
    return self.base_model(
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 188, in forward
    return self.model.forward(*args, **kwargs)
  File "/home/witold/ML/llm/home-llm/.train_data/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 1166, in forward
    shift_logits = logits[..., :-1, :].contiguous()
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 4.30 GiB. GPU 0 has a total capacity of 23.65 GiB of which 3.30 GiB is free. Including non-PyTorch memory, this process has 20.32 GiB memory in use. Of the allocated memory 19.54 GiB is allocated by PyTorch, and 327.24 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

running command nvidia-smi I see this output:

Tue Aug 13 14:25:04 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01             Driver Version: 535.183.01   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090        Off | 00000000:01:00.0 Off |                  Off |
|  0%   38C    P8              13W / 500W |  20841MiB / 24564MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1330      G   /usr/lib/xorg/Xorg                            9MiB |
|    0   N/A  N/A      1498      G   /usr/bin/gnome-shell                         10MiB |
|    0   N/A  N/A     10547      C   python3                                   20804MiB |
+---------------------------------------------------------------------------------------+
@witold-gren witold-gren added the bug Something isn't working label Aug 13, 2024
@acon96
Copy link
Owner

acon96 commented Aug 13, 2024

Wow I totally forgot to push those training script fixes. I just pushed them up to develop.

The script has to know how to properly mask out the user's request and only train on the assistant response portion. I have a method to auto detect this but that can fail which causes the training script to mask the entire message and causes loss to immediately go to zero. Some tokenizers don't work properly with the auto-detect and you need to provide a set of prefix and suffix tokens like this:

https://github.com/acon96/home-llm/blob/develop/train.py#L747

The updated training script should also print out a warning if the entire message is masked as well as print out the tokenized messages so you can determine the tokens you would need to provide for the masking to work. There's a few examples from the various models I have tried in the script.

@witold-gren
Copy link
Contributor Author

Thanks for explanation, but from practical site what I should change? 😀 I'm not that proficient with model training tools yet.. How you recognise those values for this specific model? Should I uncomment this code?

    # fix for polka-1.1 not detecting split properly
    # prefix_ids = [43883, 20255, 13]
    # suffix_ids = [43882, 29871, 13]

@acon96
Copy link
Owner

acon96 commented Aug 13, 2024

Thanks for explanation, but from practical site what I should change? 😀 I'm not that proficient with model training tools yet.. How you recognise those values for this specific model? Should I uncomment this code?

    # fix for polka-1.1 not detecting split properly
    # prefix_ids = [43883, 20255, 13]
    # suffix_ids = [43882, 29871, 13]

Yes exactly. And if you have a new model to fine tune you just need to determine the prefix and suffix tokens that surround the response from the assistant.

@witold-gren
Copy link
Contributor Author

hm.. in your message it sounds like it's something very simple 😀 but can you tell me how to determine those values? I think I will be able to add 2 additional params to set these values ​​if required so that I don't have to comment the code 😀

@witold-gren
Copy link
Contributor Author

I updated script to latest version. I also updated the way how I run the main train script:

LLM_MODEL_NAME="home-llama-3.1-8b-polish"
LLM_MODEL="NousResearch/Meta-Llama-3.1-8B-Instruct"

# Example models for train:
# meta-llama/Meta-Llama-3.1-8B-Instruct
# speakleash/Bielik-7B-Instruct-v0.1
# eryk-mazus/polka-1.1b-chat
# OPI-PG/Qra-7b
# OPI-PG/Qra-1b
# OPI-PG/Qra-13b

TRAIN_DATASET="./data/train_test_sample_xl_sharegpt_polish/home_assistant_train.jsonl"
TEST_DATASET="./data/train_test_sample_xl_sharegpt_polish/home_assistant_test.jsonl"

python3 train.py \
	--run_name $LLM_MODEL_NAME \
	--base_model $LLM_MODEL \
	--train_dataset $TRAIN_DATASET \
	--test_dataset $TEST_DATASET \
	--bf16 \
	--batch_size 64 \
	--micro_batch_size 2 \
	--epochs 2 \
	--gradient_checkpointing \
	--group_by_length \
	--ctx_size 2048 \
	--save_steps 50 \
	--save_total_limit 20 \
	--eval_steps 50 \
	--logging_steps 5 \
	--learning_rate_warmup 0.03 \
	--learning_rate 1e-5 \
	--use_lora \
	--lora_rank 32 \
	--lora_alpha 64 \
	--lora_modules up_proj,down_proj,q_proj,v_proj,o_proj

I don't understand where is a problem but now I see lot of this kind of errors:

[[128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 975, 25, 1272, 289, 30286, 299, 3315, 11, 220, 24, 112611, 2649, 220, 2366, 17, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 9198, 23049, 1535, 9198, 41155, 1535, 9198, 5069, 49248, 705, 12067, 1388, 5752, 5508, 340, 55615, 77781, 36188, 512, 7551, 15892, 2180, 321, 3153, 62, 3042, 36000, 47232, 364, 22378, 86, 450, 269, 74603, 1167, 7661, 7545, 86, 3978, 2963, 27960, 13414, 6, 284, 1022, 198, 4238, 962, 337, 3919, 86437, 86, 60477, 9509, 22389, 8390, 364, 33, 84995, 818, 297, 7545, 86, 3978, 2963, 648, 7500, 4653, 4415, 656, 273, 6, 284, 389, 26, 485, 7992, 320, 2614, 11, 220, 1187, 11, 220, 10290, 1237, 2287, 14062, 17825, 98116, 5407, 89, 1100, 316, 11044, 19699, 62, 2868, 38977, 258, 47011, 364, 44717, 21951, 1100, 316, 11044, 19699, 297, 577, 24409, 58197, 613, 6, 284, 220, 1032, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 62, 540, 4653, 6551, 318, 78380, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 289, 105125, 6077, 261, 3893, 6, 284, 1022, 198, 4238, 1276, 64, 821, 1286, 722, 1149, 525, 22389, 8390, 364, 129, 248, 86, 10574, 23762, 289, 503, 1091, 6729, 18472, 4697, 30086, 4657, 4415, 656, 273, 6, 284, 389, 68336, 48162, 320, 13341, 11, 220, 1591, 11, 220, 13302, 1237, 3391, 14062, 31278, 5314, 1412, 21557, 62, 16, 364, 54, 306, 4010, 859, 735, 1412, 7907, 6, 284, 389, 198, 7551, 15892, 10583, 3059, 45500, 14088, 22212, 1107, 20942, 364, 3617, 3059, 45500, 14088, 22212, 23643, 6, 284, 28747, 26, 12821, 28, 15, 13, 2304, 198, 1039, 1444, 1590, 11949, 266, 35045, 22645, 364, 57, 373, 74, 656, 10244, 2642, 6780, 25981, 11949, 266, 61482, 6, 284, 36718, 198, 4238, 516, 44711, 646, 1739, 275, 364, 43, 23465, 924, 6410, 13780, 289, 40828, 648, 6, 284, 389, 26, 13223, 11912, 320, 3264, 11, 220, 7743, 11, 220, 8899, 1237, 2137, 14062, 4238, 1258, 78, 4697, 1704, 1590, 11949, 266, 37975, 364, 43, 23465, 25981, 11949, 266, 13780, 289, 342, 5169, 6077, 84, 6, 284, 389, 26, 12481, 85, 32012, 320, 8899, 11, 220, 1187, 11, 220, 12326, 1237, 4044, 14062, 31278, 516, 1739, 275, 62, 17, 364, 54, 306, 4010, 5382, 924, 6410, 24665, 6, 284, 389, 198, 7551, 15892, 13269, 20762, 62, 20, 364, 63365, 5119, 20, 6, 284, 1022, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 49410, 1394, 1910, 84, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 4983, 1394, 1910, 84, 6, 284, 389, 198, 17825, 87555, 1677, 13255, 623, 13327, 5267, 5010, 34478, 62, 540, 4653, 364, 21119, 9265, 81946, 5267, 5010, 34478, 7500, 4653, 6, 284, 220, 24, 198, 3773, 1326, 4697, 42413, 64, 646, 1100, 532, 21557, 364, 39972, 1169, 88, 289, 66789, 12543, 36900, 274, 1100, 532, 7907, 6, 284, 8036, 198, 31278, 870, 2596, 9336, 530, 324, 754, 364, 51, 9225, 363, 306, 4010, 859, 40715, 9336, 6, 284, 1022, 198, 4238, 5314, 1412, 21557, 14725, 669, 648, 79, 30678, 364, 42, 1412, 21557, 4821, 356, 648, 79, 81793, 93127, 86, 10574, 23762, 6, 284, 1022, 54847, 324, 59770, 320, 2946, 11, 220, 10697, 11, 220, 11727, 1237, 2983, 14062, 31278, 32663, 19700, 62, 17, 364, 42987, 23762, 7545, 22212, 93562, 6780, 6, 284, 389, 198, 7551, 15892, 5314, 1412, 21557, 50840, 364, 46, 8207, 45804, 42930, 9038, 689, 597, 1412, 2734, 13546, 6, 284, 389, 26, 44584, 3509, 22037, 11348, 26, 12821, 28, 15, 13, 22, 198, 4238, 13, 4720, 331, 364, 129, 248, 86, 10574, 23762, 4415, 7661, 35989, 26738, 6, 284, 389, 26, 27178, 12481, 320, 1419, 11, 220, 1627, 11, 220, 10828, 340, 94874, 739, 2172, 89925, 364, 1090, 39567, 306, 3919, 2024, 55825, 350, 2172, 6, 284, 7155, 26, 13556, 12310, 26, 1313, 34, 26, 843, 14062, 19834, 10583, 1727, 64, 62, 16, 364, 129, 248, 839, 39518, 118955, 10036, 550, 9345, 6, 284, 4642, 198, 4238, 739, 88, 4697, 669, 94523, 918, 333, 87, 364, 51, 4010, 818, 83008, 10574, 23762, 24890, 24665, 6, 284, 1022, 26, 23449, 98335, 24409, 320, 8953, 11, 220, 10674, 11, 220, 1627, 1237, 3264, 14062, 7551, 15892, 31339, 73, 58021, 12162, 599, 306, 1928, 4697, 111627, 364, 2170, 599, 306, 66789, 437, 37975, 31948, 584, 73, 18980, 84, 6, 284, 28747, 26, 12821, 28, 15, 13, 17, 198, 1039, 54762, 8733, 364, 57, 373, 74, 1377, 89, 17043, 656, 829, 359, 88, 6, 284, 16447, 198, 3773, 4025, 89127, 37975, 364, 57, 89127, 24665, 1377, 89, 17043, 342, 5169, 6077, 24665, 6, 284, 8036, 198, 3773, 739, 4010, 818, 20404, 2201, 364, 39972, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 6, 284, 1825, 198, 4238, 10583, 89, 21151, 1311, 56042, 52789, 34033, 364, 3617, 16284, 11044, 83008, 10574, 23762, 312, 56042, 96653, 818, 6, 284, 389, 26, 485, 7992, 320, 2075, 11, 220, 15, 11, 220, 5894, 1237, 5547, 128009, 128006, 882, 128007, 271, 48872, 50272, 11044, 83008, 10574, 23762, 312, 56042, 96653, 818, 13599, 42910, 78512, 3273, 12088, 336, 36900, 37050, 111806, 36900, 78161, 648, 30, 128009, 128006, 78191, 128007, 271, 652, 16284, 11044, 83008, 10574, 23762, 312, 56042, 96653, 818, 13599, 42910, 78512, 3273, 78161, 648, 220, 5547, 13, 128009, 128006, 78191, 128007, 271], [128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 14804, 78, 9520, 95811, 49221, 12585, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 13, 9220, 5697, 72086, 40611, 7019, 258, 3458, 60605, 61852, 39234, 3458, 602, 1167, 8805, 3059, 1167, 42930, 53444, 7886, 12951, 11018, 15179, 3513, 752, 12, 1255, 454, 113068, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 1313, 25, 1544, 289, 11752, 6217, 11, 220, 1032, 274, 1291, 20553, 689, 220, 2366, 17, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 12067, 1388, 5752, 5508, 340, 55615, 77781, 36188, 512, 7551, 15892, 83605, 437, 64014, 364, 1090, 39567, 306, 3919, 5222, 2308, 12103, 437, 6, 284, 1022, 198, 1039, 558, 347, 86, 60477, 9509, 35045, 40952, 364, 57, 373, 74, 656, 10244, 1289, 7500, 24409, 61482, 6, 284, 36718, 198, 17825, 98116, 37422, 805, 58554, 45553, 766, 9672, 12543, 364, 44717, 98502, 73, 55174, 19699, 13672, 14088, 66105, 4632, 78380, 6, 284, 220, 24, 198, 31278, 32663, 19700, 62, 16, 364, 42987, 23762, 7545, 22212, 93562, 6780, 6, 284, 389, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 67708, 96377, 364, 81450, 55489, 297, 7545, 86, 3978, 2963, 27960, 12460, 96377, 6, 284, 389, 198, 4238, 558, 5408, 67914, 2868, 722, 33367, 364, 129, 248, 86, 10574, 23762, 289, 6160, 324, 3059, 4415, 1370, 466, 3059, 6, 284, 1022, 198, 4238, 1276, 64, 821, 1286, 4803, 3394, 722, 33367, 364, 129, 248, 86, 10574, 23762, 597, 2259, 4415, 656, 273, 6, 284, 1022, 26, 1544, 14062, 17790, 34430, 90179, 3039, 918, 2866, 364, 38, 4697, 42413, 88, 289, 45500, 14088, 22212, 83008, 6629, 4697, 289, 274, 1100, 532, 7907, 6, 284, 1022, 198, 4238, 94281, 36934, 86437, 646, 103844, 10830, 364, 46, 7545, 86, 3978, 2963, 648, 10244, 2642, 88, 7661, 5817, 347, 10830, 6, 284, 389, 26, 13223, 11912, 320, 6550, 11, 220, 8259, 11, 220, 6849, 1237, 508, 14062, 94874, 870, 2596, 9336, 94437, 2265, 530, 21, 364, 39, 2596, 9336, 16333, 2265, 350, 21, 1322, 6, 284, 1022, 26, 13556, 5234, 26, 972, 34, 26, 1272, 14062, 1039, 38038, 89, 17043, 47022, 73, 18980, 24665, 364, 57, 373, 74, 1377, 89, 17043, 50272, 77, 718, 6, 284, 16447, 198, 3773, 13, 3043, 64, 89925, 364, 1090, 39567, 306, 818, 938, 1169, 88, 1167, 99734, 72, 6, 284, 8036, 198, 4238, 1276, 64, 1928, 1832, 55174, 890, 69713, 354, 53413, 6551, 343, 33131, 364, 129, 248, 86, 10574, 23762, 44615, 354, 79853, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 26, 11490, 398, 6798, 320, 12338, 11, 220, 6393, 11, 220, 8929, 1237, 2618, 14062, 4238, 1190, 51588, 21557, 364, 129, 248, 86, 10574, 23762, 289, 503, 51588, 7907, 6, 284, 389, 198, 3773, 1444, 1832, 64123, 1928, 8255, 37975, 364, 38, 5169, 6077, 289, 1832, 41796, 12543, 19665, 47011, 6, 284, 1825, 198, 4238, 10583, 89, 21151, 47232, 26053, 34033, 364, 3617, 16284, 11044, 297, 7545, 86, 3978, 2963, 648, 281, 28342, 8783, 8122, 86, 450, 88, 73, 53199, 6, 284, 389, 26, 1399, 14062, 31278, 739, 88, 2312, 88, 1928, 276, 1247, 364, 54, 306, 4010, 859, 4415, 13892, 2312, 1631, 342, 1201, 84, 6, 284, 1022, 198, 4238, 25244, 5267, 33542, 5407, 89, 6910, 41796, 1286, 6551, 31498, 364, 129, 248, 86, 10574, 23762, 289, 21951, 6910, 41796, 44906, 4415, 105747, 55174, 6, 284, 1022, 26, 717, 14062, 3773, 13, 7545, 86, 3978, 7792, 364, 129, 119, 278, 5308, 3841, 83008, 3978, 7792, 24665, 6, 284, 8036, 198, 4238, 10583, 89, 21151, 80704, 722, 33367, 364, 129, 248, 86, 10574, 23762, 289, 6160, 324, 3059, 6, 284, 1022, 54847, 324, 59770, 320, 2075, 11, 220, 13860, 11, 220, 11247, 340, 1039, 516, 1100, 532, 21557, 62, 18, 364, 57, 373, 74, 289, 490, 89, 762, 57647, 274, 1100, 532, 7907, 6, 284, 36718, 198, 4238, 739, 88, 4697, 1704, 1003, 3039, 918, 333, 87, 364, 51, 4010, 818, 83008, 10574, 23762, 311, 109149, 88, 6, 284, 389, 26, 51755, 13553, 320, 1591, 11, 220, 10350, 11, 220, 1958, 340, 4238, 5314, 1412, 21557, 669, 1885, 96934, 269, 1215, 669, 1786, 364, 42, 1412, 18314, 597, 5985, 66, 1609, 597, 675, 37975, 435, 1662, 818, 83008, 10574, 23762, 6, 284, 1022, 26, 6083, 14062, 31278, 516, 44711, 623, 28342, 8783, 33691, 10952, 364, 44503, 3919, 4024, 4010, 859, 656, 40828, 84, 6, 284, 1022, 198, 7551, 15892, 23451, 47232, 1284, 875, 364, 17111, 6007, 47561, 6, 284, 1022, 198, 4238, 558, 347, 86, 60477, 9509, 364, 129, 248, 86, 10574, 23762, 7661, 86, 1832, 48372, 24665, 6, 284, 1022, 26, 5833, 4, 128009, 128006, 882, 128007, 271, 40173, 11044, 7545, 6940, 2693, 5267, 656, 220, 1419, 3009, 7907, 128009, 128006, 78191, 128007, 271, 79, 602, 281, 1174, 256, 281, 297, 294, 342, 436, 1167, 384, 503, 256, 259, 384, 296, 281, 384, 436, 264, 259, 577, 436, 220, 5267, 1174, 256, 577, 274, 259, 264, 289, 602, 264, 503, 220, 5985, 272, 256, 259, 384, 296, 281, 384, 436, 264, 259, 577, 436, 220, 5267, 256, 308, 264, 256, 366, 259, 384, 296, 281, 721, 272, 871, 256, 274, 259, 297, 281, 308, 602, 1174, 256, 293, 577, 296, 16853, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 94874, 995, 54625, 498, 330, 5775, 9385, 794, 330, 94874, 870, 2596, 9336, 94437, 2265, 530, 21, 498, 330, 35658, 794, 220, 1419, 534, 74694, 128009, 128006, 78191, 128007, 271]]
warning! example had no assistant response in it!

now I see 11201 warnings but script still calls to DataCollatorForSupervisedFineTuning class. 🧐

@acon96
Copy link
Owner

acon96 commented Aug 15, 2024

So what is happening is the script is printing the warning along with the tokenized version of the example that is being trained on. This is just a helpful thing I did to help determine what the correct prefix_ids and suffix_ids.

The idea is that the training script need to build a mask (array) that is True for all of the tokens that the assistant would respond with, and False for all of the tokens that the user inputted or was included in the system prompt. We don't want to train the model to reproduce those tokens because it is a waste of computation power and can also confuse the model. This is the biggest difference between pre-training an LLM and performing Supervised Fine Tuning. In pre-training you train the model on the entire example (mask is True for all tokens).

The training script here attempts to auto-detect which tokens are for the assistant, but that is not trivial, and sometimes you need to manually provide the tokens that start an assistant response, and the tokens that end an assistant response.

For a model like TinyLlama that uses Zephyr format, the prefix is <|assistant|>\n and the suffix is </s>. That ends up equating to [29966, 29989, 465, 22137, 29989, 29958, 13] and [2] as the prefix and suffix tokens respectively (the suffix token is actually just the end of sentence/eos token in this case but is not always true for all chat models)

The other issue is that tokenizers perform differently based on if a token is preceded by white-space or if it is adjacent to the token that came before it. For example, check out https://gpt-tokenizer.dev/ to mess around with the GPT tokenizers. Try tokenizing the word Computerwiz. You will see that it returns 2 tokens: [50411, 146049] split up with Computer and wiz. Now if you split the word up with a space as Computer wiz, you would expect there to be 3 tokens now, the same 2 tokens from before separated by the "space" token. Instead you get back 2 tokens [50411, 121731]. The first token is the same, but the second token has "consumed" the space we inserted and is now a totally different token. This means that figuring out the exact prefix and suffix IDs can be a bit hard to do without the full prompt assembled and all of the spaces, newlines, and tabs that are part of the full chat template.

I tried to make a script to show this and potentially assist in determining the correct prefix and suffix tokens for your model:
https://github.com/acon96/home-llm/blob/develop/find_split.py

@witold-gren
Copy link
Contributor Author

Thank you for the very good explanation. Now I understand the problem more broadly. Also, many thanks for creating this find_split.py script which certainly simplifies the search for correct values. After running this script, several values ​​were returned:

Estimated tokens for NousResearch/Meta-Llama-3.1-8B-Instruct
response prefix:
<|start_header_id|>assistant<|end_header_id|>

tokens with no leading whitespace: [128006, 78191, 128007, 271]
tokens with leading whitespace: [220, 128006, 78191, 128007, 271]
tokens with leading newline: [198, 128006, 78191, 128007, 271]
---------------
response suffix:
<|eot_id|><|start_header_id|>assistant<|end_header_id|>

tokens with no leading whitespace: [128009, 128006, 78191, 128007, 271]
tokens with leading whitespace: [220, 128009, 128006, 78191, 128007, 271]
tokens with leading newline: [198, 128009, 128006, 78191, 128007, 271]

How should I decide which to choose? 😀

@witold-gren
Copy link
Contributor Author

BTW. @acon96 your knowledge is amazing, so I took the liberty of updating the documentation to be helpful for people like me who are learning this whole process. I hope you don't mind me making these changes. Also I little updated script to try not hardcode any value if the are not needed. 😀 Thanks again for your work 💪🏻 If you have a time please check my PR #204

@acon96
Copy link
Owner

acon96 commented Aug 16, 2024

it looks like the Llama 3 tokenizer doesn't have any issues with the white-space.

I would use

prefix_ids =  [128006, 78191, 128007, 271]
suffix_ids = [128009, 128006, 78191, 128007, 271]

And thanks for adding the new docs page. I haven't had the time to properly document that part of the process. Mostly been focused on user guides for people using the HA integration.

@witold-gren
Copy link
Contributor Author

It is very strange.. because even if I set properly prefix and suffix the script still can show me info about no assistant response. In example below I checked and exist this params for prefix and suffix (now I understand why you create this output) but still I see this info.

Loading model 'NousResearch/Meta-Llama-3.1-8B-Instruct'...
Model will target using 23000MiB of VRAM on GPU 0
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:01<00:00,  2.67it/s]
Creating LoRA for model...
trainable params: 59,768,832 || all params: 8,090,030,080 || trainable%: 0.7388
Loading dataset...
Tokenizing datasets...
Train dataset has 47M tokens. Longest Example: 1598 tokens
prefix_ids: ['128006', '78191', '128007', '271']
suffix_ids: ['128009', '128006', '78191', '128007', '271']
Using auto half precision backend
***** Running training *****
  Num examples = 54,458
  Num Epochs = 2
  Instantaneous batch size per device = 2
  Total train batch size (w. parallel, distributed & accumulation) = 64
  Gradient Accumulation steps = 32
  Total optimization steps = 1,700
  Number of trainable parameters = 59,768,832
  0%|                                                                                                                                                                                                                                 | 0/1700 [00:00<?, ?it/s]warning! example had no assistant response in it!
[[128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 845, 25, 18, 289, 76360, 8510, 8458, 11, 220, 966, 274, 1291, 20553, 689, 220, 2366, 21, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 9198, 23049, 1535, 9198, 41155, 1535, 9198, 5069, 49248, 705, 12067, 1388, 5752, 5508, 340, 55615, 77781, 36188, 512, 4238, 1276, 64, 1928, 1832, 55174, 63839, 90179, 3039, 6551, 343, 33131, 364, 129, 248, 86, 10574, 23762, 289, 274, 1100, 532, 7907, 733, 7545, 18595, 36900, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 100249, 347, 1414, 12481, 320, 20, 11, 220, 5894, 11, 220, 12112, 1237, 24, 14062, 17825, 1326, 11710, 1149, 5697, 51364, 364, 129, 248, 839, 39518, 16999, 6885, 7545, 7907, 5267, 25088, 342, 11710, 1149, 7910, 6, 284, 220, 24, 198, 19834, 72699, 416, 89, 19700, 5407, 9345, 364, 10313, 118955, 10036, 550, 9345, 6, 284, 4642, 198, 4238, 558, 347, 73, 1394, 67, 364, 129, 248, 86, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 6, 284, 389, 26, 3226, 14062, 94874, 749, 122749, 89925, 73593, 55825, 364, 1090, 39567, 306, 3919, 2024, 55825, 386, 122749, 656, 63888, 1568, 14088, 28383, 1099, 46894, 22212, 12543, 1160, 86, 47011, 6, 284, 8798, 26, 4699, 26, 2495, 37, 26, 2813, 14062, 4238, 25244, 5267, 33542, 4803, 683, 27835, 89, 6551, 343, 33131, 364, 129, 248, 86, 10574, 23762, 289, 597, 683, 27835, 26738, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 198, 3773, 1190, 14466, 646, 309, 5059, 21151, 364, 47, 21963, 291, 1756, 3059, 1377, 89, 17043, 342, 5169, 6077, 24665, 6, 284, 1825, 198, 4238, 739, 88, 4697, 62, 24409, 58197, 3919, 623, 564, 62424, 669, 648, 79, 30678, 364, 51, 57504, 23166, 62424, 21236, 58197, 3919, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 1022, 26, 6086, 14062, 1039, 13, 4720, 331, 364, 57, 373, 74, 1377, 89, 17043, 4415, 7661, 35989, 3059, 6, 284, 16447, 198, 3773, 13, 4697, 1394, 3675, 4657, 364, 129, 119, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 6, 284, 8036, 198, 7551, 15892, 31942, 12407, 646, 1100, 532, 21557, 364, 46, 8207, 45804, 42930, 97092, 289, 274, 1100, 532, 7907, 6, 284, 1022, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 1704, 1590, 11949, 36409, 1928, 5169, 6077, 78380, 364, 3617, 3059, 45500, 14088, 22212, 297, 7545, 86, 3978, 2963, 689, 25981, 11949, 36409, 342, 5169, 6077, 78380, 6, 284, 1022, 198, 3773, 25244, 1551, 3074, 364, 33, 31473, 342, 5169, 6077, 13780, 289, 9115, 1551, 2912, 6, 284, 1825, 198, 3773, 1444, 72, 460, 646, 309, 5059, 347, 13780, 364, 33, 31473, 342, 5169, 6077, 13780, 289, 10574, 88, 6, 284, 1825, 198, 1039, 558, 347, 73, 1394, 67, 890, 31473, 364, 57, 373, 74, 1437, 27322, 289, 73, 1394, 67, 61482, 6, 284, 16447, 198, 4238, 739, 88, 4697, 1107, 1759, 727, 1704, 2227, 364, 67684, 81, 51458, 2394, 89, 6910, 41796, 1286, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 389, 26, 1591, 14062, 4238, 5314, 1412, 21557, 48871, 1551, 3074, 1704, 2259, 669, 648, 79, 22250, 364, 42, 1412, 15299, 9115, 1551, 3074, 4415, 3243, 78, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 1022, 198, 4238, 1326, 5169, 6077, 30487, 2453, 364, 129, 248, 86, 10574, 23762, 289, 480, 5169, 6077, 84, 15796, 2453, 6, 284, 1022, 26, 27178, 325, 351, 4542, 320, 1484, 11, 220, 10895, 11, 220, 6550, 340, 4238, 1276, 64, 821, 1286, 47232, 26053, 22389, 8390, 364, 129, 248, 86, 10574, 23762, 289, 281, 28342, 8783, 8122, 86, 450, 88, 73, 49221, 4415, 1370, 466, 3059, 6, 284, 389, 26, 30323, 13553, 320, 3391, 11, 220, 14052, 11, 220, 9565, 1237, 1927, 14062, 4238, 5314, 1412, 21557, 62, 7545, 66, 12699, 669, 1786, 364, 1163, 4697, 347, 818, 83008, 10574, 23762, 4415, 30286, 66, 1122, 648, 597, 1412, 26193, 73, 6, 284, 1022, 26, 23449, 3306, 349, 11912, 320, 1627, 11, 220, 3534, 11, 220, 6069, 340, 31278, 558, 3545, 21557, 364, 54, 306, 4010, 859, 656, 550, 278, 7907, 6, 284, 1022, 198, 1039, 1444, 17872, 364, 47, 894, 59147, 3458, 123539, 2649, 94021, 6, 284, 36718, 198, 31278, 94281, 40952, 364, 54, 306, 4010, 859, 10244, 1289, 6, 284, 389, 198, 4238, 5314, 1412, 21557, 918, 347, 12543, 4657, 669, 648, 79, 22250, 364, 42, 1412, 21557, 89040, 12543, 4657, 356, 648, 79, 81793, 93127, 86, 10574, 23762, 6, 284, 389, 26, 10847, 64349, 320, 13895, 11, 220, 3264, 11, 220, 2550, 1237, 2421, 14062, 3773, 94281, 40952, 62, 17, 364, 78893, 648, 1377, 89, 17043, 656, 10244, 1289, 6, 284, 1825, 198, 94874, 5314, 10358, 73593, 55825, 364, 1090, 39567, 306, 3919, 2024, 55825, 735, 10358, 6, 284, 1022, 26, 1966, 5234, 26, 508, 34, 26, 966, 14062, 7551, 15892, 5314, 683, 27835, 89, 1928, 23762, 7545, 22212, 62, 18980, 18314, 364, 38, 23762, 7545, 22212, 220, 18980, 18314, 656, 50272, 79, 28342, 8783, 6, 284, 1022, 198, 7551, 15892, 13, 1549, 1073, 263, 623, 14898, 53440, 37975, 26756, 4010, 37975, 364, 65325, 1073, 263, 3243, 4010, 37975, 4415, 7661, 35989, 26738, 6, 284, 389, 26, 22993, 16192, 220, 16, 12, 22, 25, 578, 19121, 11348, 26, 12821, 28, 15, 13, 6281, 198, 7551, 15892, 31942, 12407, 918, 2299, 364, 93276, 62424, 52126, 18314, 97092, 6, 284, 389, 26, 42, 2234, 30353, 25, 578, 19121, 11378, 11348, 26, 12821, 28, 15, 13, 4044, 198, 1039, 38038, 89, 17043, 47022, 73, 18980, 24665, 364, 57, 373, 74, 1377, 89, 17043, 50272, 77, 718, 6, 284, 16447, 198, 1039, 739, 4010, 818, 27778, 89, 17043, 364, 57, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 6, 284, 16447, 198, 1039, 94281, 22645, 59731, 73248, 2629, 364, 57, 373, 74, 10244, 2642, 6780, 4415, 87061, 88, 6, 284, 16447, 198, 7551, 15892, 960, 526, 62, 337, 1739, 12021, 21960, 869, 1854, 364, 54, 1065, 12785, 73, 20839, 6539, 8122, 86, 450, 269, 426, 5, 46, 6, 284, 389, 26, 62416, 10690, 25, 14598, 14853, 3744, 3861, 26, 12821, 28, 15, 13, 2491, 198, 17790, 13, 7545, 86, 10574, 22250, 67543, 359, 88, 364, 54, 45500, 14088, 22212, 297, 7545, 86, 3978, 2963, 689, 829, 359, 88, 6, 284, 389, 128009, 128006, 882, 128007, 271, 23361, 45500, 14088, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 61576, 19639, 3251, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 602, 297, 2042, 62031, 9832, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 128009, 128006, 78191, 128007, 271, 23361, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 602, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 602, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 16999, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 36570, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 36570, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 16999, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 264, 64954, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 264, 64954, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 16999, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 68841, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 68841, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 198, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 4238, 46734, 13965, 498, 330, 5775, 9385, 794, 330, 4238, 558, 347, 73, 1394, 67, 17122, 5018, 8095, 794, 330, 3773, 4757, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 7255, 84, 15901, 17, 1394, 3675, 4657, 17122, 5018, 8095, 794, 330, 1039, 48281, 498, 330, 5775, 9385, 794, 330, 1039, 739, 4010, 818, 27778, 89, 17043, 17122, 74694, 128009, 128006, 78191, 128007, 271], [128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 19, 25, 2166, 289, 18472, 36708, 1247, 11, 220, 777, 274, 1291, 20553, 689, 220, 2366, 22, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 12067, 1388, 5752, 5508, 705, 29302, 41155, 1535, 29302, 22175, 2401, 7806, 1535, 29302, 5069, 1535, 29302, 13530, 746, 55615, 77781, 36188, 512, 31278, 516, 6181, 42083, 4697, 785, 689, 364, 54, 306, 4010, 859, 4502, 4697, 785, 72, 6, 284, 389, 198, 3773, 18663, 2201, 5407, 16284, 11044, 364, 39972, 1169, 88, 4415, 5509, 11044, 1167, 21951, 77055, 6, 284, 8036, 198, 7551, 15892, 960, 526, 62, 337, 1739, 12021, 21960, 869, 1854, 364, 54, 1065, 12785, 73, 20839, 6539, 8122, 86, 450, 269, 426, 5, 46, 6, 284, 5737, 26, 42398, 30427, 323, 279, 7302, 46459, 596, 14637, 26, 12821, 28, 15, 13, 1187, 198, 17790, 13, 7545, 86, 10574, 22250, 1704, 1590, 11949, 266, 24665, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 25981, 11949, 266, 47011, 6, 284, 389, 198, 54803, 21066, 5314, 7606, 3292, 127638, 364, 46, 7737, 324, 89, 42930, 735, 1412, 18314, 6, 284, 28649, 291, 198, 31278, 1326, 276, 1247, 364, 54, 306, 4010, 859, 4415, 7205, 438, 13846, 6, 284, 1022, 198, 1039, 92232, 4697, 785, 689, 364, 57, 373, 74, 4824, 61482, 4502, 4697, 785, 72, 6, 284, 36718, 198, 1039, 739, 4010, 818, 27778, 89, 17043, 364, 57, 373, 74, 13892, 2312, 5759, 1377, 89, 17043, 6, 284, 36718, 198, 4238, 739, 88, 4697, 623, 564, 62424, 1928, 1291, 1704, 2227, 364, 67684, 81, 51458, 45295, 62424, 342, 1291, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 389, 26, 6455, 15299, 320, 5245, 11, 220, 2495, 11, 220, 3076, 340, 31278, 558, 14898, 300, 3059, 62, 16, 364, 54, 306, 4010, 859, 4415, 7661, 35989, 26738, 6, 284, 389, 198, 4238, 53602, 2868, 62, 16, 364, 129, 248, 86, 10574, 23762, 289, 6160, 324, 3059, 6, 284, 389, 26, 39730, 39853, 12481, 320, 4645, 11, 220, 9690, 11, 220, 8848, 340, 1039, 558, 347, 73, 1394, 67, 890, 31473, 364, 57, 373, 74, 1437, 27322, 289, 73, 1394, 67, 61482, 6, 284, 36718, 198, 4238, 32663, 19700, 62, 18, 364, 129, 248, 86, 10574, 22250, 656, 93562, 6780, 6, 284, 1022, 26, 325, 351, 4542, 320, 1591, 11, 220, 4513, 11, 220, 6083, 1237, 16, 14062, 7551, 15892, 962, 5859, 26053, 5487, 10647, 2054, 364, 90937, 36934, 28699, 37937, 936, 289, 503, 51588, 7907, 6, 284, 5737, 26, 74008, 31251, 25, 578, 90686, 62812, 26, 12821, 28, 15, 13, 1682, 198, 1039, 516, 7569, 2411, 364, 57, 373, 74, 8219, 3039, 6, 284, 16447, 198, 17825, 98116, 5407, 89, 1100, 316, 11044, 19699, 62, 2868, 38977, 258, 47011, 364, 44717, 21951, 1100, 316, 11044, 19699, 297, 577, 24409, 58197, 613, 6, 284, 220, 1187, 198, 7551, 15892, 1258, 52789, 821, 564, 49178, 936, 27405, 1107, 20942, 28752, 364, 626, 52789, 42161, 49178, 936, 656, 597, 2439, 14559, 23643, 6, 284, 1022, 198, 1039, 960, 299, 19699, 890, 10333, 20898, 14088, 3458, 364, 33, 62031, 2649, 24817, 127854, 84, 6, 284, 36718, 198, 31278, 5314, 1412, 21557, 6551, 95550, 5267, 376, 89, 3458, 364, 54, 306, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 6, 284, 389, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 890, 19260, 654, 68, 364, 54, 45500, 14088, 22212, 83008, 6629, 4697, 6160, 84, 654, 5759, 6, 284, 1022, 198, 3773, 13, 7545, 86, 3978, 7792, 364, 129, 119, 278, 5308, 3841, 83008, 3978, 7792, 24665, 6, 284, 1825, 198, 17825, 87555, 1677, 13255, 623, 13327, 5267, 5010, 34478, 62, 540, 4653, 364, 21119, 9265, 81946, 5267, 5010, 34478, 7500, 4653, 6, 284, 220, 605, 198, 3773, 558, 6400, 364, 129, 119, 278, 5308, 3841, 12460, 300, 24665, 6, 284, 8036, 198, 4238, 1326, 1832, 969, 1928, 76612, 6551, 31498, 364, 129, 248, 86, 10574, 23762, 289, 56979, 483, 25134, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 198, 4238, 1276, 64, 821, 1286, 722, 1149, 525, 22389, 8390, 364, 129, 248, 86, 10574, 23762, 289, 503, 1091, 6729, 18472, 4697, 30086, 4657, 4415, 656, 273, 6, 284, 389, 26, 508, 14062, 7551, 15892, 72405, 47232, 364, 12950, 6785, 6007, 6, 284, 35595, 26, 7905, 44, 81399, 25, 25225, 285, 6187, 11348, 320, 2181, 596, 264, 8681, 74658, 611, 31125, 369, 9220, 611, 5936, 304, 12366, 611, 578, 66701, 315, 10919, 611, 7834, 36069, 1237, 12821, 28, 15, 13, 2137, 198, 4238, 516, 1100, 532, 21557, 62, 17, 364, 129, 248, 86, 10574, 23762, 289, 274, 1100, 532, 7907, 6, 284, 389, 26, 40043, 13553, 320, 2614, 11, 220, 13078, 11, 220, 1032, 1237, 1399, 14062, 94874, 30288, 677, 2176, 89925, 364, 1090, 39567, 306, 3919, 2024, 55825, 37211, 677, 2176, 6, 284, 1022, 26, 13556, 12310, 26, 2031, 37, 26, 1490, 14062, 17790, 14778, 7545, 86, 3978, 2963, 648, 5407, 89, 21151, 24665, 890, 2453, 88, 364, 54, 45500, 14088, 22212, 83008, 6629, 4697, 289, 1437, 309, 648, 50272, 61004, 6, 284, 389, 198, 1039, 558, 564, 62424, 4803, 472, 57129, 364, 57, 373, 74, 656, 281, 28342, 8783, 23119, 6, 284, 16447, 198, 4238, 13, 4697, 1394, 3675, 4657, 62, 17, 364, 129, 248, 86, 10574, 23762, 289, 75527, 1394, 1873, 6, 284, 389, 26, 4767, 14062, 7551, 15892, 58986, 5416, 646, 1100, 532, 21557, 364, 1163, 442, 92538, 289, 274, 1100, 532, 7907, 6, 284, 389, 26, 72765, 21415, 11348, 20880, 220, 20, 25, 22862, 763, 578, 4946, 4336, 26, 12821, 28, 15, 13, 3487, 198, 3773, 516, 44711, 623, 564, 62424, 821, 84, 28305, 364, 39972, 1169, 88, 289, 89838, 1631, 281, 28342, 8783, 6, 284, 8036, 128009, 128006, 882, 128007, 271, 652, 3059, 45500, 14088, 83008, 10574, 23762, 289, 6160, 324, 3059, 11, 21951, 1065, 45752, 89, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 602, 14479, 86, 1832, 53060, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 128009, 128006, 78191, 128007, 271, 652, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 602, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 602, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 550, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 36570, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 36570, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 550, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 264, 64954, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 264, 64954, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 550, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 68841, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 68841, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 198, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 4238, 24582, 498, 330, 5775, 9385, 794, 330, 4238, 53602, 2868, 62, 16, 17122, 5018, 8095, 794, 330, 31278, 1896, 20542, 17374, 498, 330, 5775, 9385, 794, 330, 31278, 5314, 1412, 21557, 6551, 95550, 3855, 10731, 24, 376, 89, 3458, 17122, 5018, 8095, 794, 330, 3773, 5949, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 7255, 84, 16037, 40924, 3978, 7792, 17122, 74694, 128009, 128006, 78191, 128007, 271]]
warning! example had no assistant response in it!
[[128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 845, 25, 18, 289, 76360, 8510, 8458, 11, 220, 966, 274, 1291, 20553, 689, 220, 2366, 21, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 9198, 23049, 1535, 9198, 41155, 1535, 9198, 5069, 49248, 705, 12067, 1388, 5752, 5508, 340, 55615, 77781, 36188, 512, 4238, 1276, 64, 1928, 1832, 55174, 63839, 90179, 3039, 6551, 343, 33131, 364, 129, 248, 86, 10574, 23762, 289, 274, 1100, 532, 7907, 733, 7545, 18595, 36900, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 100249, 347, 1414, 12481, 320, 20, 11, 220, 5894, 11, 220, 12112, 1237, 24, 14062, 17825, 1326, 11710, 1149, 5697, 51364, 364, 129, 248, 839, 39518, 16999, 6885, 7545, 7907, 5267, 25088, 342, 11710, 1149, 7910, 6, 284, 220, 24, 198, 19834, 72699, 416, 89, 19700, 5407, 9345, 364, 10313, 118955, 10036, 550, 9345, 6, 284, 4642, 198, 4238, 558, 347, 73, 1394, 67, 364, 129, 248, 86, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 6, 284, 389, 26, 3226, 14062, 94874, 749, 122749, 89925, 73593, 55825, 364, 1090, 39567, 306, 3919, 2024, 55825, 386, 122749, 656, 63888, 1568, 14088, 28383, 1099, 46894, 22212, 12543, 1160, 86, 47011, 6, 284, 8798, 26, 4699, 26, 2495, 37, 26, 2813, 14062, 4238, 25244, 5267, 33542, 4803, 683, 27835, 89, 6551, 343, 33131, 364, 129, 248, 86, 10574, 23762, 289, 597, 683, 27835, 26738, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 198, 3773, 1190, 14466, 646, 309, 5059, 21151, 364, 47, 21963, 291, 1756, 3059, 1377, 89, 17043, 342, 5169, 6077, 24665, 6, 284, 1825, 198, 4238, 739, 88, 4697, 62, 24409, 58197, 3919, 623, 564, 62424, 669, 648, 79, 30678, 364, 51, 57504, 23166, 62424, 21236, 58197, 3919, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 1022, 26, 6086, 14062, 1039, 13, 4720, 331, 364, 57, 373, 74, 1377, 89, 17043, 4415, 7661, 35989, 3059, 6, 284, 16447, 198, 3773, 13, 4697, 1394, 3675, 4657, 364, 129, 119, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 6, 284, 8036, 198, 7551, 15892, 31942, 12407, 646, 1100, 532, 21557, 364, 46, 8207, 45804, 42930, 97092, 289, 274, 1100, 532, 7907, 6, 284, 1022, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 1704, 1590, 11949, 36409, 1928, 5169, 6077, 78380, 364, 3617, 3059, 45500, 14088, 22212, 297, 7545, 86, 3978, 2963, 689, 25981, 11949, 36409, 342, 5169, 6077, 78380, 6, 284, 1022, 198, 3773, 25244, 1551, 3074, 364, 33, 31473, 342, 5169, 6077, 13780, 289, 9115, 1551, 2912, 6, 284, 1825, 198, 3773, 1444, 72, 460, 646, 309, 5059, 347, 13780, 364, 33, 31473, 342, 5169, 6077, 13780, 289, 10574, 88, 6, 284, 1825, 198, 1039, 558, 347, 73, 1394, 67, 890, 31473, 364, 57, 373, 74, 1437, 27322, 289, 73, 1394, 67, 61482, 6, 284, 16447, 198, 4238, 739, 88, 4697, 1107, 1759, 727, 1704, 2227, 364, 67684, 81, 51458, 2394, 89, 6910, 41796, 1286, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 389, 26, 1591, 14062, 4238, 5314, 1412, 21557, 48871, 1551, 3074, 1704, 2259, 669, 648, 79, 22250, 364, 42, 1412, 15299, 9115, 1551, 3074, 4415, 3243, 78, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 1022, 198, 4238, 1326, 5169, 6077, 30487, 2453, 364, 129, 248, 86, 10574, 23762, 289, 480, 5169, 6077, 84, 15796, 2453, 6, 284, 1022, 26, 27178, 325, 351, 4542, 320, 1484, 11, 220, 10895, 11, 220, 6550, 340, 4238, 1276, 64, 821, 1286, 47232, 26053, 22389, 8390, 364, 129, 248, 86, 10574, 23762, 289, 281, 28342, 8783, 8122, 86, 450, 88, 73, 49221, 4415, 1370, 466, 3059, 6, 284, 389, 26, 30323, 13553, 320, 3391, 11, 220, 14052, 11, 220, 9565, 1237, 1927, 14062, 4238, 5314, 1412, 21557, 62, 7545, 66, 12699, 669, 1786, 364, 1163, 4697, 347, 818, 83008, 10574, 23762, 4415, 30286, 66, 1122, 648, 597, 1412, 26193, 73, 6, 284, 1022, 26, 23449, 3306, 349, 11912, 320, 1627, 11, 220, 3534, 11, 220, 6069, 340, 31278, 558, 3545, 21557, 364, 54, 306, 4010, 859, 656, 550, 278, 7907, 6, 284, 1022, 198, 1039, 1444, 17872, 364, 47, 894, 59147, 3458, 123539, 2649, 94021, 6, 284, 36718, 198, 31278, 94281, 40952, 364, 54, 306, 4010, 859, 10244, 1289, 6, 284, 389, 198, 4238, 5314, 1412, 21557, 918, 347, 12543, 4657, 669, 648, 79, 22250, 364, 42, 1412, 21557, 89040, 12543, 4657, 356, 648, 79, 81793, 93127, 86, 10574, 23762, 6, 284, 389, 26, 10847, 64349, 320, 13895, 11, 220, 3264, 11, 220, 2550, 1237, 2421, 14062, 3773, 94281, 40952, 62, 17, 364, 78893, 648, 1377, 89, 17043, 656, 10244, 1289, 6, 284, 1825, 198, 94874, 5314, 10358, 73593, 55825, 364, 1090, 39567, 306, 3919, 2024, 55825, 735, 10358, 6, 284, 1022, 26, 1966, 5234, 26, 508, 34, 26, 966, 14062, 7551, 15892, 5314, 683, 27835, 89, 1928, 23762, 7545, 22212, 62, 18980, 18314, 364, 38, 23762, 7545, 22212, 220, 18980, 18314, 656, 50272, 79, 28342, 8783, 6, 284, 1022, 198, 7551, 15892, 13, 1549, 1073, 263, 623, 14898, 53440, 37975, 26756, 4010, 37975, 364, 65325, 1073, 263, 3243, 4010, 37975, 4415, 7661, 35989, 26738, 6, 284, 389, 26, 22993, 16192, 220, 16, 12, 22, 25, 578, 19121, 11348, 26, 12821, 28, 15, 13, 6281, 198, 7551, 15892, 31942, 12407, 918, 2299, 364, 93276, 62424, 52126, 18314, 97092, 6, 284, 389, 26, 42, 2234, 30353, 25, 578, 19121, 11378, 11348, 26, 12821, 28, 15, 13, 4044, 198, 1039, 38038, 89, 17043, 47022, 73, 18980, 24665, 364, 57, 373, 74, 1377, 89, 17043, 50272, 77, 718, 6, 284, 16447, 198, 1039, 739, 4010, 818, 27778, 89, 17043, 364, 57, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 6, 284, 16447, 198, 1039, 94281, 22645, 59731, 73248, 2629, 364, 57, 373, 74, 10244, 2642, 6780, 4415, 87061, 88, 6, 284, 16447, 198, 7551, 15892, 960, 526, 62, 337, 1739, 12021, 21960, 869, 1854, 364, 54, 1065, 12785, 73, 20839, 6539, 8122, 86, 450, 269, 426, 5, 46, 6, 284, 389, 26, 62416, 10690, 25, 14598, 14853, 3744, 3861, 26, 12821, 28, 15, 13, 2491, 198, 17790, 13, 7545, 86, 10574, 22250, 67543, 359, 88, 364, 54, 45500, 14088, 22212, 297, 7545, 86, 3978, 2963, 689, 829, 359, 88, 6, 284, 389, 128009, 128006, 882, 128007, 271, 23361, 45500, 14088, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 61576, 19639, 3251, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 602, 297, 2042, 62031, 9832, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 128009, 128006, 78191, 128007, 271, 23361, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 602, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 602, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 16999, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 36570, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 36570, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 16999, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 264, 64954, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 264, 64954, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 16999, 45500, 66, 39518, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 68841, 1200, 70491, 14088, 19700, 47153, 278, 5308, 3841, 75527, 1394, 3675, 74, 24665, 68841, 297, 2042, 62031, 55489, 1167, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 198, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 4238, 46734, 13965, 498, 330, 5775, 9385, 794, 330, 4238, 558, 347, 73, 1394, 67, 17122, 5018, 8095, 794, 330, 3773, 4757, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 7255, 84, 15901, 17, 1394, 3675, 4657, 17122, 5018, 8095, 794, 330, 1039, 48281, 498, 330, 5775, 9385, 794, 330, 1039, 739, 4010, 818, 27778, 89, 17043, 17122, 74694, 128009, 128006, 78191, 128007, 271], [128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 19, 25, 2166, 289, 18472, 36708, 1247, 11, 220, 777, 274, 1291, 20553, 689, 220, 2366, 22, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 12067, 1388, 5752, 5508, 705, 29302, 41155, 1535, 29302, 22175, 2401, 7806, 1535, 29302, 5069, 1535, 29302, 13530, 746, 55615, 77781, 36188, 512, 31278, 516, 6181, 42083, 4697, 785, 689, 364, 54, 306, 4010, 859, 4502, 4697, 785, 72, 6, 284, 389, 198, 3773, 18663, 2201, 5407, 16284, 11044, 364, 39972, 1169, 88, 4415, 5509, 11044, 1167, 21951, 77055, 6, 284, 8036, 198, 7551, 15892, 960, 526, 62, 337, 1739, 12021, 21960, 869, 1854, 364, 54, 1065, 12785, 73, 20839, 6539, 8122, 86, 450, 269, 426, 5, 46, 6, 284, 5737, 26, 42398, 30427, 323, 279, 7302, 46459, 596, 14637, 26, 12821, 28, 15, 13, 1187, 198, 17790, 13, 7545, 86, 10574, 22250, 1704, 1590, 11949, 266, 24665, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 25981, 11949, 266, 47011, 6, 284, 389, 198, 54803, 21066, 5314, 7606, 3292, 127638, 364, 46, 7737, 324, 89, 42930, 735, 1412, 18314, 6, 284, 28649, 291, 198, 31278, 1326, 276, 1247, 364, 54, 306, 4010, 859, 4415, 7205, 438, 13846, 6, 284, 1022, 198, 1039, 92232, 4697, 785, 689, 364, 57, 373, 74, 4824, 61482, 4502, 4697, 785, 72, 6, 284, 36718, 198, 1039, 739, 4010, 818, 27778, 89, 17043, 364, 57, 373, 74, 13892, 2312, 5759, 1377, 89, 17043, 6, 284, 36718, 198, 4238, 739, 88, 4697, 623, 564, 62424, 1928, 1291, 1704, 2227, 364, 67684, 81, 51458, 45295, 62424, 342, 1291, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 389, 26, 6455, 15299, 320, 5245, 11, 220, 2495, 11, 220, 3076, 340, 31278, 558, 14898, 300, 3059, 62, 16, 364, 54, 306, 4010, 859, 4415, 7661, 35989, 26738, 6, 284, 389, 198, 4238, 53602, 2868, 62, 16, 364, 129, 248, 86, 10574, 23762, 289, 6160, 324, 3059, 6, 284, 389, 26, 39730, 39853, 12481, 320, 4645, 11, 220, 9690, 11, 220, 8848, 340, 1039, 558, 347, 73, 1394, 67, 890, 31473, 364, 57, 373, 74, 1437, 27322, 289, 73, 1394, 67, 61482, 6, 284, 36718, 198, 4238, 32663, 19700, 62, 18, 364, 129, 248, 86, 10574, 22250, 656, 93562, 6780, 6, 284, 1022, 26, 325, 351, 4542, 320, 1591, 11, 220, 4513, 11, 220, 6083, 1237, 16, 14062, 7551, 15892, 962, 5859, 26053, 5487, 10647, 2054, 364, 90937, 36934, 28699, 37937, 936, 289, 503, 51588, 7907, 6, 284, 5737, 26, 74008, 31251, 25, 578, 90686, 62812, 26, 12821, 28, 15, 13, 1682, 198, 1039, 516, 7569, 2411, 364, 57, 373, 74, 8219, 3039, 6, 284, 16447, 198, 17825, 98116, 5407, 89, 1100, 316, 11044, 19699, 62, 2868, 38977, 258, 47011, 364, 44717, 21951, 1100, 316, 11044, 19699, 297, 577, 24409, 58197, 613, 6, 284, 220, 1187, 198, 7551, 15892, 1258, 52789, 821, 564, 49178, 936, 27405, 1107, 20942, 28752, 364, 626, 52789, 42161, 49178, 936, 656, 597, 2439, 14559, 23643, 6, 284, 1022, 198, 1039, 960, 299, 19699, 890, 10333, 20898, 14088, 3458, 364, 33, 62031, 2649, 24817, 127854, 84, 6, 284, 36718, 198, 31278, 5314, 1412, 21557, 6551, 95550, 5267, 376, 89, 3458, 364, 54, 306, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 6, 284, 389, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 890, 19260, 654, 68, 364, 54, 45500, 14088, 22212, 83008, 6629, 4697, 6160, 84, 654, 5759, 6, 284, 1022, 198, 3773, 13, 7545, 86, 3978, 7792, 364, 129, 119, 278, 5308, 3841, 83008, 3978, 7792, 24665, 6, 284, 1825, 198, 17825, 87555, 1677, 13255, 623, 13327, 5267, 5010, 34478, 62, 540, 4653, 364, 21119, 9265, 81946, 5267, 5010, 34478, 7500, 4653, 6, 284, 220, 605, 198, 3773, 558, 6400, 364, 129, 119, 278, 5308, 3841, 12460, 300, 24665, 6, 284, 8036, 198, 4238, 1326, 1832, 969, 1928, 76612, 6551, 31498, 364, 129, 248, 86, 10574, 23762, 289, 56979, 483, 25134, 4415, 9115, 5267, 376, 3059, 6, 284, 389, 198, 4238, 1276, 64, 821, 1286, 722, 1149, 525, 22389, 8390, 364, 129, 248, 86, 10574, 23762, 289, 503, 1091, 6729, 18472, 4697, 30086, 4657, 4415, 656, 273, 6, 284, 389, 26, 508, 14062, 7551, 15892, 72405, 47232, 364, 12950, 6785, 6007, 6, 284, 35595, 26, 7905, 44, 81399, 25, 25225, 285, 6187, 11348, 320, 2181, 596, 264, 8681, 74658, 611, 31125, 369, 9220, 611, 5936, 304, 12366, 611, 578, 66701, 315, 10919, 611, 7834, 36069, 1237, 12821, 28, 15, 13, 2137, 198, 4238, 516, 1100, 532, 21557, 62, 17, 364, 129, 248, 86, 10574, 23762, 289, 274, 1100, 532, 7907, 6, 284, 389, 26, 40043, 13553, 320, 2614, 11, 220, 13078, 11, 220, 1032, 1237, 1399, 14062, 94874, 30288, 677, 2176, 89925, 364, 1090, 39567, 306, 3919, 2024, 55825, 37211, 677, 2176, 6, 284, 1022, 26, 13556, 12310, 26, 2031, 37, 26, 1490, 14062, 17790, 14778, 7545, 86, 3978, 2963, 648, 5407, 89, 21151, 24665, 890, 2453, 88, 364, 54, 45500, 14088, 22212, 83008, 6629, 4697, 289, 1437, 309, 648, 50272, 61004, 6, 284, 389, 198, 1039, 558, 564, 62424, 4803, 472, 57129, 364, 57, 373, 74, 656, 281, 28342, 8783, 23119, 6, 284, 16447, 198, 4238, 13, 4697, 1394, 3675, 4657, 62, 17, 364, 129, 248, 86, 10574, 23762, 289, 75527, 1394, 1873, 6, 284, 389, 26, 4767, 14062, 7551, 15892, 58986, 5416, 646, 1100, 532, 21557, 364, 1163, 442, 92538, 289, 274, 1100, 532, 7907, 6, 284, 389, 26, 72765, 21415, 11348, 20880, 220, 20, 25, 22862, 763, 578, 4946, 4336, 26, 12821, 28, 15, 13, 3487, 198, 3773, 516, 44711, 623, 564, 62424, 821, 84, 28305, 364, 39972, 1169, 88, 289, 89838, 1631, 281, 28342, 8783, 6, 284, 8036, 128009, 128006, 882, 128007, 271, 652, 3059, 45500, 14088, 83008, 10574, 23762, 289, 6160, 324, 3059, 11, 21951, 1065, 45752, 89, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 602, 14479, 86, 1832, 53060, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 128009, 128006, 78191, 128007, 271, 652, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 602, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 602, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 550, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 36570, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 36570, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 550, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 264, 64954, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 264, 64954, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 550, 7215, 89, 1791, 19700, 83008, 10574, 23762, 289, 6160, 324, 3059, 68841, 21951, 1065, 45752, 39518, 4024, 4010, 859, 597, 1412, 18314, 4415, 30286, 46802, 6077, 1631, 7019, 3978, 81, 26738, 68841, 14479, 86, 1291, 19700, 47153, 278, 5308, 3841, 83008, 3978, 7792, 24665, 198, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 4238, 24582, 498, 330, 5775, 9385, 794, 330, 4238, 53602, 2868, 62, 16, 17122, 5018, 8095, 794, 330, 31278, 1896, 20542, 17374, 498, 330, 5775, 9385, 794, 330, 31278, 5314, 1412, 21557, 6551, 95550, 3855, 10731, 24, 376, 89, 3458, 17122, 5018, 8095, 794, 330, 3773, 5949, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 7255, 84, 16037, 40924, 3978, 7792, 17122, 74694, 128009, 128006, 78191, 128007, 271]]
warning! example had no assistant response in it!
[[128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 508, 25, 1927, 289, 9115, 5985, 43813, 11, 220, 914, 357, 3418, 20926, 689, 220, 9639, 15, 198, 3642, 4697, 51640, 25, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 9198, 23049, 1535, 9198, 41155, 1535, 9198, 5069, 49248, 705, 12067, 1388, 5752, 5508, 705, 29302, 41155, 1535, 29302, 22175, 2401, 7806, 1535, 29302, 5069, 1535, 29302, 13530, 746, 55615, 77781, 36188, 512, 4238, 5314, 1412, 21557, 14725, 669, 648, 79, 30678, 364, 42, 1412, 21557, 4821, 356, 648, 79, 81793, 93127, 86, 10574, 23762, 6, 284, 1022, 26, 3306, 349, 12481, 320, 4645, 11, 220, 6849, 11, 220, 10336, 1237, 2614, 14062, 3773, 1444, 1832, 64123, 1928, 8255, 37975, 364, 9023, 89, 17043, 656, 289, 123030, 4657, 19665, 78380, 6, 284, 15676, 198, 4238, 25244, 5267, 33542, 5407, 89, 6910, 41796, 1286, 6551, 31498, 364, 129, 248, 86, 10574, 23762, 289, 21951, 6910, 41796, 44906, 4415, 105747, 55174, 6, 284, 1022, 26, 28969, 13553, 320, 10861, 11, 220, 11256, 11, 220, 2983, 1237, 777, 14062, 31278, 5314, 1412, 21557, 62, 16, 364, 54, 306, 4010, 859, 735, 1412, 7907, 6, 284, 389, 198, 31278, 749, 3843, 89, 4803, 5985, 45336, 364, 38, 4697, 42413, 88, 4024, 4010, 859, 75527, 1394, 3675, 74, 37975, 6, 284, 389, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 623, 28342, 8783, 623, 3545, 7907, 364, 54, 45500, 14088, 22212, 297, 7545, 86, 3978, 2963, 689, 289, 550, 278, 7907, 6, 284, 389, 198, 31278, 46005, 942, 623, 554, 364, 54, 306, 4010, 859, 43048, 942, 64, 6, 284, 1022, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 646, 1100, 532, 7907, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 289, 274, 1100, 532, 7907, 6, 284, 1022, 198, 3773, 516, 331, 363, 1247, 59731, 8698, 261, 364, 9023, 89, 17043, 656, 10244, 1289, 4415, 2872, 727, 6, 284, 1825, 198, 19834, 749, 62424, 16653, 364, 6540, 1293, 102501, 95891, 82470, 22212, 6, 284, 4642, 198, 1039, 13, 4720, 331, 364, 57, 373, 74, 1377, 89, 17043, 4415, 7661, 35989, 3059, 6, 284, 16447, 198, 4238, 558, 347, 73, 1394, 67, 62, 16, 364, 47, 1291, 9092, 3059, 83008, 10574, 23762, 4415, 7661, 3841, 40611, 67, 13846, 6, 284, 1022, 26, 485, 1122, 1171, 320, 14378, 11, 220, 1227, 11, 220, 8874, 1237, 806, 14062, 31278, 1276, 64, 1704, 337, 49221, 57283, 3978, 81, 26738, 364, 54, 306, 4010, 859, 1167, 95550, 5267, 376, 89, 3919, 6, 284, 1022, 198, 17825, 10583, 89, 1100, 316, 77, 52558, 10499, 4697, 51071, 1745, 613, 3200, 12543, 364, 3617, 89, 1100, 316, 77, 52558, 297, 95332, 266, 45423, 613, 436, 613, 3200, 12543, 6, 284, 220, 1591, 198, 7551, 15892, 5314, 683, 27835, 89, 1928, 23762, 7545, 22212, 62, 18980, 18314, 364, 38, 23762, 7545, 22212, 220, 18980, 18314, 656, 50272, 79, 28342, 8783, 6, 284, 5737, 26, 57051, 25, 83752, 25, 578, 220, 20, 14270, 11348, 26, 12821, 28, 15, 13, 4044, 198, 1039, 13, 6077, 4697, 677, 1247, 364, 57, 373, 74, 656, 1377, 89, 17043, 21951, 6910, 41796, 8083, 6, 284, 36718, 198, 4238, 960, 5641, 4803, 1412, 18314, 364, 7545, 86, 10574, 23762, 34634, 1529, 38346, 289, 597, 1412, 7907, 6, 284, 1022, 26, 4238, 62654, 12481, 320, 10828, 11, 220, 12652, 11, 220, 12652, 1237, 15, 14062, 1039, 25244, 1551, 3074, 59731, 1704, 3394, 364, 57, 373, 74, 656, 9115, 1551, 2912, 1167, 3243, 10830, 6, 284, 16447, 198, 7551, 15892, 13, 8461, 646, 1100, 532, 21557, 364, 50, 1100, 532, 21557, 94558, 6, 284, 1022, 198, 4238, 739, 88, 4697, 47022, 73, 25898, 648, 918, 333, 87, 364, 129, 248, 86, 10574, 23762, 13892, 2312, 13546, 584, 73, 7545, 25088, 6, 284, 1022, 26, 3433, 278, 12481, 320, 975, 11, 220, 5833, 11, 220, 11584, 1237, 1954, 14062, 7551, 15892, 1326, 23762, 7545, 77, 7723, 6551, 95550, 5267, 376, 89, 818, 623, 6400, 364, 38, 23762, 7545, 77, 7723, 1167, 95550, 5267, 376, 89, 818, 4415, 32278, 6, 284, 389, 26, 68753, 279, 10170, 32666, 25, 34989, 279, 14270, 26, 12821, 28, 15, 13, 6069, 198, 19834, 4456, 332, 22212, 22, 364, 45, 13744, 7803, 37975, 9198, 220, 22, 6, 284, 4642, 198, 17825, 98116, 56390, 8510, 2734, 5759, 6551, 2649, 19699, 364, 44717, 20950, 8510, 2734, 5759, 1536, 363, 47992, 41796, 12543, 6, 284, 220, 22, 198, 31278, 558, 564, 62424, 26596, 7545, 18595, 3919, 364, 54, 306, 4010, 859, 289, 281, 28342, 8783, 733, 7545, 66, 6258, 1631, 6, 284, 389, 198, 4238, 516, 1100, 532, 21557, 364, 129, 248, 86, 10574, 23762, 289, 274, 1100, 532, 7907, 6, 284, 389, 26, 85, 32012, 320, 13895, 11, 220, 10148, 11, 220, 14125, 340, 17790, 739, 4010, 818, 62, 7545, 86, 10574, 22250, 86437, 86, 60477, 4458, 364, 3617, 3059, 45500, 14088, 22212, 13892, 2312, 5759, 83008, 6629, 4697, 7500, 24409, 47011, 6, 284, 1022, 198, 4238, 1326, 5169, 6077, 11757, 28122, 669, 1786, 364, 626, 48492, 25981, 11949, 266, 37975, 289, 342, 5169, 6077, 84, 120176, 818, 83008, 10574, 23762, 6, 284, 1022, 26, 3714, 88, 65561, 320, 679, 11, 220, 10161, 11, 220, 10680, 1237, 2075, 14062, 54803, 21066, 34430, 90179, 3039, 3797, 847, 364, 46, 7737, 324, 89, 42930, 289, 66789, 12543, 36900, 274, 1100, 532, 7907, 6, 284, 28649, 291, 198, 4238, 2180, 321, 3153, 1552, 361, 62, 16, 364, 30690, 3153, 67051, 6, 284, 389, 26, 485, 7992, 320, 5833, 11, 220, 1691, 11, 220, 6069, 1237, 3080, 14062, 7551, 15892, 516, 3633, 18150, 35102, 47232, 364, 1090, 39567, 306, 3919, 8122, 86, 450, 269, 21533, 6, 284, 1022, 198, 4238, 1326, 1832, 969, 35045, 36934, 6551, 31498, 364, 129, 248, 86, 10574, 23762, 289, 10244, 2642, 648, 4415, 105747, 55174, 6, 284, 389, 26, 27178, 325, 351, 4542, 320, 6069, 11, 220, 10132, 11, 220, 3264, 1237, 1682, 4, 128009, 128006, 882, 128007, 271, 86, 45500, 14088, 83008, 10574, 23762, 13892, 2312, 13546, 584, 73, 7545, 25088, 602, 4024, 4010, 859, 1167, 95550, 5267, 376, 89, 3919, 602, 14479, 86, 1832, 53060, 1377, 89, 17043, 656, 289, 123030, 4657, 19665, 78380, 128009, 128006, 78191, 128007, 271, 86, 45500, 66, 39518, 1536, 84, 4433, 77781, 65987, 83008, 10574, 23762, 13892, 2312, 13546, 584, 73, 7545, 25088, 602, 4433, 1412, 309, 1122, 648, 4024, 4010, 859, 1167, 95550, 5267, 376, 89, 3919, 602, 7661, 37491, 39518, 1377, 89, 17043, 656, 289, 123030, 4657, 19665, 78380, 289, 45500, 66, 39518, 1536, 84, 4433, 77781, 65987, 83008, 10574, 23762, 13892, 2312, 13546, 584, 73, 7545, 25088, 36570, 4433, 1412, 309, 1122, 648, 4024, 4010, 859, 1167, 95550, 5267, 376, 89, 3919, 36570, 7661, 37491, 39518, 1377, 89, 17043, 656, 289, 123030, 4657, 19665, 78380, 289, 45500, 66, 39518, 1536, 84, 4433, 77781, 65987, 83008, 10574, 23762, 13892, 2312, 13546, 584, 73, 7545, 25088, 264, 64954, 4433, 1412, 309, 1122, 648, 4024, 4010, 859, 1167, 95550, 5267, 376, 89, 3919, 264, 64954, 7661, 37491, 39518, 1377, 89, 17043, 656, 289, 123030, 4657, 19665, 78380, 289, 45500, 66, 39518, 1536, 84, 4433, 77781, 65987, 83008, 10574, 23762, 13892, 2312, 13546, 584, 73, 7545, 25088, 68841, 4433, 1412, 309, 1122, 648, 4024, 4010, 859, 1167, 95550, 5267, 376, 89, 3919, 68841, 7661, 37491, 39518, 1377, 89, 17043, 656, 289, 123030, 4657, 19665, 78380, 198, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 4238, 46734, 4570, 498, 330, 5775, 9385, 794, 330, 4238, 739, 88, 3855, 15901, 17, 47022, 73, 3855, 16037, 65, 3855, 7755, 22, 648, 918, 333, 87, 17122, 5018, 8095, 794, 330, 31278, 46734, 4570, 498, 330, 5775, 9385, 794, 330, 31278, 1276, 64, 1704, 337, 49221, 57283, 3978, 81, 26738, 17122, 5018, 8095, 794, 330, 3773, 5949, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 1444, 3855, 410, 69, 18, 64123, 1928, 8255, 37975, 17122, 74694, 128009, 128006, 78191, 128007, 271], [128000, 128006, 9125, 128007, 271, 41, 18223, 7545, 15179, 2149, 9520, 95811, 49221, 439, 599, 306, 336, 15592, 11, 42942, 97134, 34967, 4433, 77781, 36188, 289, 118447, 13, 24100, 40637, 1662, 281, 21446, 6077, 82, 3059, 71748, 19700, 1167, 40811, 11044, 1167, 9680, 3178, 66, 37937, 28445, 72086, 89, 4415, 281, 21446, 6077, 82, 3059, 95771, 19700, 11, 33054, 55081, 96351, 16999, 45500, 89594, 1167, 7661, 45553, 6179, 34478, 627, 92040, 940, 3458, 10087, 89, 2259, 602, 828, 311, 220, 605, 25, 4370, 289, 76360, 8510, 8458, 11, 220, 975, 47097, 220, 2366, 22, 198, 3642, 4697, 51640, 25, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 10182, 995, 766, 276, 7450, 968, 276, 7450, 705, 10182, 995, 1552, 75026, 3283, 75026, 705, 10182, 995, 1552, 54803, 7450, 1535, 10182, 995, 623, 9915, 7450, 1535, 10182, 995, 54625, 7, 35658, 705, 10182, 24582, 1535, 10182, 46734, 13965, 1535, 10182, 46734, 4570, 1535, 8571, 2337, 20542, 17374, 1535, 8571, 1896, 20542, 17374, 1535, 8571, 24582, 1535, 8571, 46734, 13965, 1535, 8571, 46734, 4570, 1535, 3504, 4757, 39187, 1535, 3504, 5949, 39187, 1535, 3504, 13530, 39187, 1535, 3504, 24582, 1535, 3177, 24582, 1535, 3177, 46734, 13965, 1535, 3177, 46734, 4570, 67423, 6855, 8568, 37730, 705, 5409, 21679, 1535, 5409, 48281, 1535, 3772, 15892, 26142, 11507, 29645, 1535, 3772, 15892, 26142, 61089, 1535, 3772, 15892, 26142, 22932, 1535, 3772, 15892, 26142, 22932, 61089, 1535, 3772, 15892, 26142, 53652, 29645, 1535, 3772, 15892, 26142, 19577, 1535, 3772, 15892, 24582, 1535, 3772, 15892, 46734, 13965, 1535, 3772, 15892, 46734, 4570, 1535, 3772, 15892, 41584, 14325, 1535, 3772, 15892, 41584, 722, 1088, 1535, 3772, 15892, 41584, 8401, 1535, 3480, 24582, 1535, 3480, 46734, 13965, 1535, 3480, 46734, 4570, 1535, 9198, 23049, 1535, 9198, 41155, 1535, 9198, 5069, 49248, 705, 12067, 1388, 5752, 5508, 340, 55615, 77781, 36188, 512, 7551, 15892, 516, 14780, 29892, 9153, 1954, 81, 364, 16493, 2308, 18907, 64, 6, 284, 1022, 198, 31278, 46005, 942, 623, 554, 364, 54, 306, 4010, 859, 43048, 942, 64, 6, 284, 389, 198, 1039, 739, 4010, 818, 27778, 89, 17043, 364, 57, 373, 74, 289, 73, 1394, 67, 37975, 4415, 7661, 86, 60477, 9509, 6, 284, 16447, 198, 4238, 739, 88, 4697, 47232, 26053, 1704, 2227, 364, 51, 57504, 23166, 62424, 8122, 86, 450, 88, 73, 3919, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 1022, 26, 23449, 3306, 349, 11912, 320, 2970, 11, 220, 4578, 11, 220, 3076, 1237, 1041, 14062, 94874, 1326, 21557, 89, 3055, 68391, 364, 52, 14088, 5985, 11377, 12951, 2024, 55825, 40005, 6, 284, 7155, 26, 13556, 5234, 26, 5495, 37, 26, 2495, 14062, 4238, 10583, 89, 21151, 86, 47022, 73, 25898, 648, 22389, 8390, 364, 129, 248, 86, 10574, 23762, 289, 50272, 79, 28342, 8783, 6, 284, 389, 26, 40043, 13553, 320, 1399, 11, 220, 13341, 11, 220, 2813, 1237, 1682, 14062, 1039, 870, 526, 277, 821, 4355, 62, 4697, 76411, 364, 57, 373, 74, 31948, 75527, 76411, 6, 284, 16447, 198, 1039, 558, 347, 73, 1394, 67, 890, 31473, 364, 57, 373, 74, 1437, 27322, 289, 73, 1394, 67, 61482, 6, 284, 16447, 198, 94874, 13, 466, 55825, 918, 2249, 61408, 364, 21902, 55825, 27466, 33010, 17664, 27395, 6, 284, 8798, 669, 1786, 26, 13556, 5234, 26, 1419, 34, 26, 845, 14062, 3773, 516, 331, 363, 1247, 59731, 8698, 261, 364, 9023, 89, 17043, 656, 10244, 1289, 4415, 2872, 727, 6, 284, 1825, 198, 17790, 63062, 589, 1559, 918, 2866, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 289, 15020, 277, 3059, 4415, 75527, 347, 13846, 6, 284, 1022, 198, 3773, 739, 4010, 818, 20404, 2201, 364, 39972, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 6, 284, 8036, 198, 7551, 15892, 1258, 52789, 821, 564, 49178, 936, 27405, 1107, 20942, 28752, 364, 626, 52789, 42161, 49178, 936, 656, 597, 2439, 14559, 23643, 6, 284, 1022, 198, 3773, 1190, 14466, 646, 309, 5059, 21151, 364, 47, 21963, 291, 1756, 3059, 1377, 89, 17043, 342, 5169, 6077, 24665, 6, 284, 1825, 198, 31278, 1190, 51588, 21557, 364, 54, 306, 4010, 859, 289, 503, 51588, 7907, 6, 284, 1022, 198, 17790, 14778, 7545, 86, 3978, 2963, 648, 62, 540, 4653, 6551, 318, 78380, 364, 3617, 3059, 45500, 14088, 22212, 83008, 6629, 4697, 289, 105125, 6077, 261, 3893, 6, 284, 1022, 198, 19834, 13, 7545, 86, 10574, 22250, 5407, 16284, 11044, 1928, 1201, 84, 364, 57, 797, 277, 297, 7545, 86, 3978, 2963, 689, 50272, 11044, 3427, 7205, 13634, 6, 284, 4642, 198, 31278, 516, 1739, 275, 62, 16, 364, 54, 306, 4010, 5382, 924, 6410, 24665, 6, 284, 389, 198, 4238, 739, 88, 4697, 722, 1149, 525, 1704, 2227, 364, 34, 648, 79, 81793, 83008, 10574, 23762, 289, 503, 1091, 6729, 18472, 4697, 30086, 4657, 1167, 13892, 63309, 6, 284, 389, 26, 23449, 3306, 349, 11912, 320, 2946, 11, 220, 1227, 11, 220, 4331, 1237, 24, 14062, 3773, 13, 4697, 1394, 3675, 4657, 26596, 7545, 18595, 3458, 364, 39972, 1169, 88, 289, 75527, 1394, 1873, 30076, 733, 18980, 6, 284, 8036, 198, 7551, 15892, 72405, 47232, 364, 12950, 6785, 6007, 6, 284, 35595, 26, 34015, 2470, 393, 2506, 18976, 578, 19121, 11378, 26, 12821, 28, 15, 13, 2166, 198, 3773, 94281, 3042, 77200, 62, 17, 364, 9023, 89, 17043, 342, 5169, 6077, 24665, 45290, 3042, 77200, 6, 284, 8036, 198, 31278, 516, 6181, 42083, 4697, 785, 689, 364, 54, 306, 4010, 859, 4502, 4697, 785, 72, 6, 284, 389, 198, 4238, 739, 88, 4697, 646, 331, 1094, 1704, 2227, 364, 32974, 2312, 64, 597, 5641, 4657, 5817, 347, 13780, 356, 648, 79, 81793, 83008, 10574, 23762, 6, 284, 389, 26, 2813, 14062, 3773, 91776, 1394, 1910, 8698, 261, 12543, 364, 38, 5169, 6077, 656, 550, 26835, 37975, 86, 9345, 2872, 261, 12543, 6, 284, 1825, 198, 7551, 15892, 10583, 3059, 45500, 14088, 22212, 1107, 20942, 364, 3617, 3059, 45500, 14088, 22212, 23643, 6, 284, 1022, 198, 31278, 558, 6400, 364, 54, 306, 4010, 859, 12460, 300, 37975, 6, 284, 389, 198, 1039, 1258, 3310, 364, 57, 373, 74, 4007, 73, 3458, 6, 284, 36718, 198, 1039, 38038, 89, 17043, 59731, 623, 6400, 364, 57, 373, 74, 2999, 89, 17043, 21951, 288, 43210, 818, 4415, 12460, 300, 6, 284, 16447, 198, 1039, 960, 84995, 818, 27778, 89, 17043, 364, 57, 373, 74, 1167, 293, 511, 20926, 1631, 584, 73, 18980, 336, 6, 284, 36718, 198, 7551, 15892, 960, 526, 62, 337, 1739, 12021, 21960, 869, 1854, 364, 54, 1065, 12785, 73, 20839, 6539, 8122, 86, 450, 269, 426, 5, 46, 6, 284, 1022, 198, 4238, 1258, 48492, 4803, 1412, 18314, 364, 129, 248, 86, 10574, 23762, 4415, 357, 48492, 597, 1412, 18314, 6, 284, 1022, 26, 20510, 983, 4542, 320, 4513, 11, 220, 12338, 11, 220, 1187, 1237, 777, 14062, 17790, 14778, 7545, 86, 3978, 2963, 648, 67708, 96377, 364, 81450, 55489, 297, 7545, 86, 3978, 2963, 27960, 12460, 96377, 6, 284, 1022, 198, 31278, 558, 14898, 300, 3059, 62, 18, 364, 54, 306, 4010, 859, 4415, 7661, 35989, 26738, 6, 284, 389, 198, 17825, 98116, 5407, 89, 1100, 316, 11044, 19699, 62, 2868, 38977, 258, 47011, 364, 44717, 21951, 1100, 316, 11044, 19699, 297, 577, 24409, 58197, 613, 6, 284, 220, 1691, 128009, 128006, 882, 128007, 271, 652, 89, 1065, 45752, 89, 4024, 4010, 859, 4415, 7661, 35989, 26738, 105860, 23762, 19699, 342, 5169, 6077, 656, 550, 26835, 37975, 86, 9345, 2872, 261, 12543, 602, 14479, 86, 1832, 53060, 938, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 128009, 128006, 78191, 128007, 271, 652, 89, 1065, 45752, 39518, 4024, 4010, 859, 4415, 7661, 35989, 26738, 602, 1167, 27322, 8826, 648, 342, 5169, 6077, 656, 550, 26835, 37975, 86, 9345, 2872, 261, 12543, 602, 7661, 37491, 39518, 938, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 21951, 1065, 45752, 39518, 4024, 4010, 859, 4415, 7661, 35989, 26738, 36570, 1167, 27322, 8826, 648, 342, 5169, 6077, 656, 550, 26835, 37975, 86, 9345, 2872, 261, 12543, 36570, 7661, 37491, 39518, 938, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 21951, 1065, 45752, 39518, 4024, 4010, 859, 4415, 7661, 35989, 26738, 264, 64954, 1167, 27322, 8826, 648, 342, 5169, 6077, 656, 550, 26835, 37975, 86, 9345, 2872, 261, 12543, 264, 64954, 7661, 37491, 39518, 938, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 21951, 1065, 45752, 39518, 4024, 4010, 859, 4415, 7661, 35989, 26738, 68841, 1167, 27322, 8826, 648, 342, 5169, 6077, 656, 550, 26835, 37975, 86, 9345, 2872, 261, 12543, 68841, 7661, 37491, 39518, 938, 1169, 88, 4415, 259, 4010, 818, 5509, 2201, 198, 74694, 5227, 78191, 198, 5018, 8095, 794, 330, 31278, 1896, 20542, 17374, 498, 330, 5775, 9385, 794, 330, 31278, 558, 14898, 300, 3059, 62, 18, 17122, 5018, 8095, 794, 330, 3773, 4757, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 91776, 1394, 1910, 8698, 261, 3855, 410, 69, 18, 86, 17122, 5018, 8095, 794, 330, 3773, 5949, 39187, 498, 330, 5775, 9385, 794, 330, 3773, 739, 4010, 818, 20404, 2201, 17122, 74694, 128009, 128006, 78191, 128007, 271]]

BTW. I did small mistake in train.py script, I create PR to fix it: #205

@acon96
Copy link
Owner

acon96 commented Aug 17, 2024

Just figured it out. You're using the correct token IDs, the parameters needed to be converted from string form to integers for the mask detection function to work properly. I just pushed a fix for that to develop. I also added some more logic to the find_split.py to make it clearer which set of token IDs to use.

@witold-gren
Copy link
Contributor Author

Thank you for find and fix the problem. I try tu ryn this script for python3 find_split.py NousResearch/Meta-Llama-3.1-8B-Instruct and it work properly.. (BTW. I have fine-tuned this model but I need test it). But when I select other models like:
python3 find_split.py speakleash/Bielik-7B-Instruct-v0.1 or python3 find_split.py OPI-PG/Qra-7b I see this error:

No chat template is set for this tokenizer, falling back to a default class-level template. This is very error-prone, because models are often trained with templates different from the class default! Default chat templates are a legacy feature and will be removed in Transformers v4.43, at which point any code depending on them will stop working. We recommend setting a valid chat template before then to ensure that this model continues working without issues.
Traceback (most recent call last):
  File "/home/witold/ML/llm/home-llm/find_split.py", line 15, in <module>
    assistant_prompt = tokenizer.apply_chat_template(
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1833, in apply_chat_template
    rendered_chat = compiled_template.render(
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/jinja2/sandbox.py", line 394, in call
    return __context.call(__obj, *args, **kwargs)
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1914, in raise_exception
    raise TemplateError(message)
jinja2.exceptions.TemplateError: Conversation roles must alternate user/assistant/user/assistant/...

Do you know why this might be happening?

@acon96
Copy link
Owner

acon96 commented Aug 18, 2024

Those models don't support system prompts. I can try and tweak things to support that but most of the code assumes that you are able to pass a system prompt to the model.

@witold-gren
Copy link
Contributor Author

I understand. If possible, I would be very grateful for adding such a support option because these are the largest Polish models and it seems to me that they would work best for the Polish language.

@djstrong
Copy link

djstrong commented Aug 20, 2024

speakleash/Bielik-7B-Instruct-v0.1 supports system prompt, so the problem must be with data: "Conversation roles must alternate user/assistant/user/assistant/..."
You can't apply chat template for conversation=[{"role": "assistant", "content": r"%%%%%%%%%%%%%%%%"}], because before assistant role must be user role.

@witold-gren
Copy link
Contributor Author

@acon96 I made a minor correction and now it looks like the templates are working. You can find the code changes below:

...
assistant_prompt = tokenizer.apply_chat_template(
    conversation=[
        {"role": "user", "content":  r"HA_REQUEST"},
        {"role": "assistant", "content":  r"HA_RESPONSE"}
    ],
    tokenize=False,
    add_generation_prompt=False,
)
print("Chat template:")
print("-" * 100)
print(assistant_prompt)
print("-" * 100)

response_prefix = assistant_prompt.split(r"HA_REQUEST")[1].split(r"HA_RESPONSE")[0]
response_suffix = assistant_prompt.split(r"HA_RESPONSE")[1]
...

in output then we have something like this:
python find_split.py speakleash/Bielik-7B-Instruct-v0.1

Chat template:
----------------------------------------------------------------------------------------------------
<s>[INST] HA_REQUEST [/INST] HA_RESPONSE</s>
----------------------------------------------------------------------------------------------------
Estimated tokens for speakleash/Bielik-7B-Instruct-v0.1
response prefix:
 [/INST]
tokens with no leading whitespace: [28705, 733, 28748, 16289, 28793, 28705]
tokens with leading whitespace: [259, 733, 28748, 16289, 28793, 28705]
tokens with leading newline: [28705, 13, 733, 28748, 16289, 28793, 28705]
---------------
response suffix:
</s>
tokens with no leading whitespace: [2]
tokens with leading whitespace: [259, 2]
tokens with leading newline: [28705, 13, 2]
---------------
'no whitespace' did not find the assistant response
'leading space' did not find the assistant response
'leading newline' did not find the assistant response

or in different model:
python find_split.py TinyLlama/TinyLlama-1.1B-Chat-v1.0

Chat template:
----------------------------------------------------------------------------------------------------
<|user|>
HA_REQUEST</s>
<|assistant|>
HA_RESPONSE</s>

----------------------------------------------------------------------------------------------------
Estimated tokens for TinyLlama/TinyLlama-1.1B-Chat-v1.0
response prefix:
<|assistant|>

tokens with no leading whitespace: [529, 29989, 465, 22137, 29989, 29958, 13]
tokens with leading whitespace: [29871, 529, 29989, 465, 22137, 29989, 29958, 13]
tokens with leading newline: [29871, 13, 29966, 29989, 465, 22137, 29989, 29958, 13]
---------------
response suffix:
</s>

tokens with no leading whitespace: [2, 29871, 13]
tokens with leading whitespace: [259, 2, 29871, 13]
tokens with leading newline: [29871, 13, 2, 29871, 13]
---------------
'no whitespace' did not find the assistant response
'leading space' did not find the assistant response
'leading newline' did not find the assistant response

another example:
python find_split.py eryk-mazus/polka-1.1b-chat

Chat template:
----------------------------------------------------------------------------------------------------
<|im_start|>system
Jesteś pomocnym asystentem.<|im_end|>
<|im_start|>user
HA_REQUEST<|im_end|>
<|im_start|>assistant
HA_RESPONSE<|im_end|>

----------------------------------------------------------------------------------------------------
Estimated tokens for eryk-mazus/polka-1.1b-chat
response prefix:
<|im_start|>assistant

tokens with no leading whitespace: [43883, 20255, 13]
tokens with leading whitespace: [259, 43883, 20255, 13]
tokens with leading newline: [29871, 13, 43883, 20255, 13]
---------------
response suffix:
<|im_end|>

tokens with no leading whitespace: [43882, 29871, 13]
tokens with leading whitespace: [259, 43882, 29871, 13]
tokens with leading newline: [29871, 13, 43882, 29871, 13]
---------------
'no whitespace' found the assistant response!
	--prefix-ids 43883,20255,13
	--suffix-ids 43882,29871,13
'leading space' did not find the assistant response
'leading newline' did not find the assistant response

@witold-gren
Copy link
Contributor Author

@acon96 new code you can find in this PR #209 please check it and test.. I think it should help 😀

@witold-gren
Copy link
Contributor Author

BTW. I checked template also with system prompt and it also works for all above examples:
python find_split.py eryk-mazus/polka-1.1b-chat

Chat template:
----------------------------------------------------------------------------------------------------
<|im_start|>system
SYSTEM_PROMPT<|im_end|>
<|im_start|>user
HA_REQUEST<|im_end|>
<|im_start|>assistant
HA_RESPONSE<|im_end|>

----------------------------------------------------------------------------------------------------
Estimated tokens for eryk-mazus/polka-1.1b-chat

python find_split.py speakleash/Bielik-7B-Instruct-v0.1

Chat template:
----------------------------------------------------------------------------------------------------
<s>[INST] <<SYS>>
SYSTEM_PROMPT
<</SYS>>

HA_REQUEST [/INST] HA_RESPONSE</s>
----------------------------------------------------------------------------------------------------
Estimated tokens for speakleash/Bielik-7B-Instruct-v0.1

python find_split.py TinyLlama/TinyLlama-1.1B-Chat-v1.0

Chat template:
----------------------------------------------------------------------------------------------------
<|system|>
SYSTEM_PROMPT</s>
<|user|>
HA_REQUEST</s>
<|assistant|>
HA_RESPONSE</s>

----------------------------------------------------------------------------------------------------
Estimated tokens for TinyLlama/TinyLlama-1.1B-Chat-v1.0

PS. I have information that models: OPI-PG/Qra-7b, OPI-PG/Qra-1b, OPI-PG/Qra-13b don't support templates.

@witold-gren
Copy link
Contributor Author

@acon96 When I try to run DPO training I get this message. What is it related to?

sob, 24 sie 2024, 23:33:57 CEST
Loading model '/home/witold/ML/llm/train-polish-model/scripts/models/home-bielik-7b-instruct-v0.1-polish/'...
Model will target using 23000MiB of VRAM on GPU 0
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:01<00:00,  5.17it/s]
Creating LoRA for model...
trainable params: 59,768,832 || all params: 7,301,500,928 || trainable%: 0.8186
Loading dataset...
Templating DPO Examples...
/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py:100: FutureWarning: Deprecated argument(s) used in '__init__': max_length, max_prompt_length, truncation_mode. Will not be supported from version '1.0.0'.

Deprecated positional argument(s) used in DPOTrainer, please use the DPOConfig to set these arguments instead.
  warnings.warn(message, FutureWarning)
Traceback (most recent call last):
  File "/home/witold/ML/llm/home-llm/train.py", line 616, in <module>
    trainer = DPOTrainer(
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "/home/witold/ML/llm/train-polish-model/.train_data/lib/python3.10/site-packages/trl/trainer/dpo_trainer.py", line 176, in __init__
    if args.model_init_kwargs is None:
AttributeError: 'TrainingArguments' object has no attribute 'model_init_kwargs'

I use this command:

#!/bin/bash
set -e
source "/home/witold/ML/llm/train-polish-model/.train_data/bin/activate"

LLM_MODEL_NAME="home-bielik-7b-instruct-v0.1-polish-dpo"
LLM_MODEL="/home/witold/ML/llm/train-polish-model/scripts/models/home-bielik-7b-instruct-v0.1-polish/"

DPO_DATASET="/home/witold/ML/llm/train-polish-model/train_test_sample_dpo_xl_sharegpt_polish/home_assistant_dpo.jsonl"
TEST_DATASET="/home/witold/ML/llm/train-polish-model/train_test_sample_dpo_xl_sharegpt_polish/home_assistant_test.jsonl"

python3 /home/witold/ML/llm/home-llm/train.py \
	--run_name $LLM_MODEL_NAME \
	--base_model $LLM_MODEL \
	--train_dataset $DPO_DATASET \
	--bf16 \
	--dpo \
	--beta 0.1 \
	--dpo_loss sigmoid \
	--batch_size 64 \
	--micro_batch_size 2 \
	--epochs 2 \
	--gradient_checkpointing \
	--ctx_size 2048 \
	--save_steps 50 \
	--save_total_limit 20 \
	--eval_steps 50 \
	--logging_steps 5 \
	--learning_rate_warmup 0.03 \
	--learning_rate 1e-5 \
	--use_lora \
	--lora_rank 32 \
	--lora_alpha 64 \
	--lora_modules up_proj,down_proj,q_proj,v_proj,o_proj \
	--lora_merge

@acon96
Copy link
Owner

acon96 commented Aug 24, 2024

I don't think I ever properly got the DPO stuff working. The loss never went down with the DPO dataset and the code hasn't been updated in a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants