# AUTOTRAIN NOT working at all

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-not-working-at-all%2F94363%3E%5C
**Category:** Beginners\
**Created:** [June 27, 2024, 9:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-not-working-at-all%2F94363 "2024-06-27T09:35:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![huggingfacepremium](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@huggingfacepremium](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhuggingfacepremium)%5C
**Post date:** [June 27, 2024, 9:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-not-working-at-all%2F94363%2F1 "2024-06-27T09:35:41Z")

</div>

I’ve tried to fine tune multiple models using many different datasets and once i click the start training button it turns red for a couple of seconds then turns blue again, I’ve tried this with multiple models and different datasets but nothing works, I’ve included the log file below

> Blockquote

Device 0: Tesla T4 - 434.4MiB/15360MiB

* * *

INFO | 2024-06-27 09:25:29 | autotrain.app.utils:kill\_process\_by\_pid:52 - Sent SIGTERM to process with PID 69

INFO | 2024-06-27 09:25:29 | autotrain.app.utils:get\_running\_jobs:26 - Killing PID: 69

ERROR | 2024-06-27 09:25:27 | autotrain.trainers.common:wrapper:121 - Error occurred while packing the dataset. Make sure that your dataset has enough samples to at least yield one packed sequence.

ValueError: Error occurred while packing the dataset. Make sure that your dataset has enough samples to at least yield one packed sequence.

raise ValueError(

File “/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py”, line 627, in \_prepare\_packed\_dataloader

return self.\_prepare\_packed\_dataloader(

File “/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py”, line 519, in \_prepare\_dataset

train\_dataset = self.\_prepare\_dataset(

File “/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py”, line 362, in **init**

return f(\*args, \*\*kwargs)

File “/app/env/lib/python3.10/site-packages/huggingface\_hub/utils/\_deprecation.py”, line 101, in inner\_f

trainer = SFTTrainer(

File “/app/env/lib/python3.10/site-packages/autotrain/trainers/clm/train\_clm\_sft.py”, line 44, in train

train\_sft(config)

File “/app/env/lib/python3.10/site-packages/autotrain/trainers/clm/ **main**.py”, line 28, in train

return func(\*args, \*\*kwargs)

File “/app/env/lib/python3.10/site-packages/autotrain/trainers/common.py”, line 117, in wrapper

Traceback (most recent call last):

The above exception was the direct cause of the following exception:

datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

raise DatasetGenerationError(“An error occurred while generating the dataset”) from e

File “/app/env/lib/python3.10/site-packages/datasets/builder.py”, line 1784, in \_prepare\_split\_single

for job\_id, done, content in self.\_prepare\_split\_single(

File “/app/env/lib/python3.10/site-packages/datasets/builder.py”, line 1627, in \_prepare\_split

self.\_prepare\_split(split\_generator, \*\*prepare\_split\_kwargs)

File “/app/env/lib/python3.10/site-packages/datasets/builder.py”, line 1122, in \_download\_and\_prepare

super().\_download\_and\_prepare(

File “/app/env/lib/python3.10/site-packages/datasets/builder.py”, line 1789, in \_download\_and\_prepare

self.\_download\_and\_prepare(

File “/app/env/lib/python3.10/site-packages/datasets/builder.py”, line 1027, in download\_and\_prepare

self.builder.download\_and\_prepare(

File “/app/env/lib/python3.10/site-packages/datasets/io/generator.py”, line 47, in read

).read()

File “/app/env/lib/python3.10/site-packages/datasets/arrow\_dataset.py”, line 1125, in from\_generator

packed\_dataset = Dataset.from\_generator(

File “/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py”, line 623, in \_prepare\_packed\_dataloader

Traceback (most recent call last):

The above exception was the direct cause of the following exception:

KeyError: ‘text’

self.formatting\_func = lambda x: x[dataset\_text\_field]

File “/app/env/lib/python3.10/site-packages/trl/trainer/utils.py”, line 480, in

buffer.append(self.formatting\_func(next(iterator)))

File “/app/env/lib/python3.10/site-packages/trl/trainer/utils.py”, line 503, in **iter**

yield from constant\_length\_iterator

File “/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py”, line 620, in data\_generator

for idx, ex in enumerate(self.config.generator(\*\*gen\_kwargs)):

File “/app/env/lib/python3.10/site-packages/datasets/packaged\_modules/generator/generator.py”, line 30, in \_generate\_examples

for key, record in generator:

File “/app/env/lib/python3.10/site-packages/datasets/builder.py”, line 1748, in \_prepare\_split\_single

ERROR | 2024-06-27 09:25:27 | autotrain.trainers.common:wrapper:120 - train has failed due to an exception: Traceback (most recent call last):

Generating train split: 0 examples [00:00, ? examples/s]

Generating train split: 0 examples [00:00, ? examples/s]

warnings.warn(

/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py:307: UserWarning: You passed a `dataset_text_field` argument to the SFTTrainer, the value you passed will override the one in the `SFTConfig`.

warnings.warn(

/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py:269: UserWarning: You passed a `max_seq_length` argument to the SFTTrainer, the value you passed will override the one in the `SFTConfig`.

warnings.warn(

/app/env/lib/python3.10/site-packages/transformers/training\_args.py:1965: FutureWarning: `--push_to_hub_token` is deprecated and will be removed in version 5 of 🤗 Transformers. Use `--hub_token` instead.

warnings.warn(

/app/env/lib/python3.10/site-packages/trl/trainer/sft\_trainer.py:181: UserWarning: You passed a `packing` argument to the SFTTrainer, the value you passed will override the one in the `SFTConfig`.

warnings.warn(

/app/env/lib/python3.10/site-packages/transformers/training\_args.py:1965: FutureWarning: `--push_to_hub_token` is deprecated and will be removed in version 5 of 🤗 Transformers. Use `--hub_token` instead.

warnings.warn(message, FutureWarning)

Deprecated positional argument(s) used in SFTTrainer, please use the SFTConfig to set these arguments instead.

/app/env/lib/python3.10/site-packages/huggingface\_hub/utils/\_deprecation.py:100: FutureWarning: Deprecated argument(s) used in ‘ **init** ’: dataset\_text\_field, max\_seq\_length, packing. Will not be supported from version ‘1.0.0’.

INFO | 2024-06-27 09:25:27 | autotrain.trainers.clm.train\_clm\_sft:train:37 - creating trainer

INFO | 2024-06-27 09:25:27 | autotrain.trainers.clm.utils:get\_model:666 - model dtype: torch.float16

Loading checkpoint shards: 100%|██████████| 2/2 [00:13\<00:00, 6.98s/it]

Loading checkpoint shards: 100%|██████████| 2/2 [00:13\<00:00, 6.48s/it]

Downloading shards: 100%|██████████| 2/2 [00:33\<00:00, 16.96s/it]

Downloading shards: 100%|██████████| 2/2 [00:33\<00:00, 16.66s/it]

`low_cpu_mem_usage` was None, now set to True since model is quantized.

. Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.

- modeling\_phi3.py

A new version of the following files was downloaded from [https://huggingface.co/microsoft/Phi-3-mini-4k-instruct:](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct:)

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:get\_model:635 - loading model…

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:get\_model:627 - loading model config…

WARNING | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:get\_model:625 - Unsloth not available, continuing without it…

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:get\_model:583 - Can use unsloth: False

. Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.

- configuration\_phi3.py

A new version of the following files was downloaded from  
[huggingface.co/microsoft/Phi-3-mini-4k-instruct:](http://huggingface.co/microsoft/Phi-3-mini-4k-instruct:)

warnings.warn(

/app/env/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:configure\_block\_size:548 - Using block size 1024

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:configure\_training\_args:485 - configuring training args

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:configure\_logging\_steps:480 - Logging steps: 25

INFO | 2024-06-27 09:24:38 | autotrain.trainers.clm.utils:configure\_logging\_steps:467 - configuring logging steps

Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.

INFO | 2024-06-27 09:24:37 | autotrain.trainers.clm.utils:process\_input\_data:395 - Valid data: None

})

num\_rows: 1110

features: [‘question’, ‘answer’],

INFO | 2024-06-27 09:24:37 | autotrain.trainers.clm.utils:process\_input\_data:394 - Train data: Dataset({

Generating train split: 100%|██████████| 1110/1110 [00:00\<00:00, 93188.10 examples/s]

Generating train split: 0%| | 0/1110 [00:00\<?, ? examples/s]

Downloading data: 100%|██████████| 600k/600k [00:00\<00:00, 20.6MB/s]

Downloading data: 0%| | 0.00/600k [00:00\<?, ?B/s]

Downloading readme: 100%|██████████| 139/139 [00:00\<00:00, 839kB/s]

Downloading readme: 0%| | 0.00/139 [00:00\<?, ?B/s]

INFO | 2024-06-27 09:24:36 | autotrain.trainers.clm.train\_clm\_sft:train:12 - Starting SFT training…

e[93m [WARNING] e[0m using untested triton version (2.3.0), only 1.0.0 is known to be compatible

e[93m [WARNING] e[0m sparse\_attn requires a torch version \>= 1.5 and \< 2.0 but detected 2.3

e[93m [WARNING] e[0m NVIDIA Inference is only supported on Ampere and newer architectures

e[93m [WARNING] e[0m Please specify the CUTLASS repo directory as environment variable $CUTLASS\_PATH

e[93m [WARNING] e[0m If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.

e[93m [WARNING] e[0m async\_io: please install the libaio-dev package with apt

e[93m [WARNING] e[0m async\_io requires the dev libaio .so object and headers but these were not found.

[2024-06-27 09:24:36,228] [INFO] [real\_accelerator.py:203:get\_accelerator] Setting ds\_accelerator to cuda (auto detect)

To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.

`--dynamo_backend` was set to a value of `'no'`

The following values were not passed to `accelerate launch` and had defaults used instead:

INFO | 2024-06-27 09:24:28 | autotrain.backends.local:create:13 - Training PID: 69

INFO | 2024-06-27 09:24:28 | autotrain.commands:launch\_command:401 - {‘model’: ‘microsoft/Phi-3-mini-4k-instruct’, ‘project\_name’: ‘autotrain-8v782-tuct3’, ‘data\_path’: ‘huggingfacepremium/train’, ‘train\_split’: ‘train’, ‘valid\_split’: None, ‘add\_eos\_token’: True, ‘block\_size’: 1024, ‘model\_max\_length’: 2048, ‘padding’: ‘right’, ‘trainer’: ‘sft’, ‘use\_flash\_attention\_2’: False, ‘log’: ‘tensorboard’, ‘disable\_gradient\_checkpointing’: False, ‘logging\_steps’: -1, ‘eval\_strategy’: ‘epoch’, ‘save\_total\_limit’: 1, ‘auto\_find\_batch\_size’: False, ‘mixed\_precision’: ‘fp16’, ‘lr’: 3e-05, ‘epochs’: 3, ‘batch\_size’: 2, ‘warmup\_ratio’: 0.1, ‘gradient\_accumulation’: 4, ‘optimizer’: ‘adamw\_torch’, ‘scheduler’: ‘linear’, ‘weight\_decay’: 0.0, ‘max\_grad\_norm’: 1.0, ‘seed’: 42, ‘chat\_template’: ‘none’, ‘quantization’: ‘int4’, ‘target\_modules’: ‘all-linear’, ‘merge\_adapter’: False, ‘peft’: True, ‘lora\_r’: 16, ‘lora\_alpha’: 32, ‘lora\_dropout’: 0.05, ‘model\_ref’: None, ‘dpo\_beta’: 0.1, ‘max\_prompt\_length’: 128, ‘max\_completion\_length’: None, ‘prompt\_text\_column’: ‘prompt’, ‘text\_column’: ‘text’, ‘rejected\_text\_column’: ‘rejected\_text’, ‘push\_to\_hub’: True, ‘username’: ‘huggingfacepremium’, ‘token’: '\*

> Blockquote

\*\*\*\*', ‘unsloth’: False}

> Blockquote
