{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import os\n", "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n", "from datasets import load_dataset, load_metric, Audio, concatenate_datasets\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Login successful\n", "Your token has been saved to /home/ubuntu/.huggingface/token\n", "\u001b[1m\u001b[31mAuthenticated through git-credential store but this isn't the helper defined on your machine.\n", "You might have to re-authenticate when pushing to the Hugging Face Hub. Run the following command in your terminal in case you want to set this credential helper as the default\n", "\n", "git config --global credential.helper store\u001b[0m\n" ] } ], "source": [ "from huggingface_hub import notebook_login\n", "\n", "notebook_login()\n", "repo_name = \"smangrul/xls-r-300m-mr\"\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Reusing dataset open_slr (/home/ubuntu/.cache/huggingface/datasets/open_slr/SLR64/0.0.0/e0fb9e36094eff565efe812d1aba158f6a46ce834cb9705c91d1e2d6ba78ed31)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Dataset({\n", " features: ['path', 'audio', 'sentence'],\n", " num_rows: 1569\n", "})\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Reusing dataset common_voice (/home/ubuntu/.cache/huggingface/datasets/mozilla-foundation___common_voice/mr/8.0.0/b8bc4d453193c06a43269b46cd87f075c70f152ac963b7f28f7a2760c45ec3e8)\n", "Reusing dataset common_voice (/home/ubuntu/.cache/huggingface/datasets/mozilla-foundation___common_voice/mr/8.0.0/b8bc4d453193c06a43269b46cd87f075c70f152ac963b7f28f7a2760c45ec3e8)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Dataset({\n", " features: ['path', 'audio', 'sentence'],\n", " num_rows: 698\n", "})\n" ] } ], "source": [ "\n", "openslr = load_dataset(\"openslr\", \"SLR64\", split=\"train\")\n", "print(openslr)\n", "\n", "common_voice_train = load_dataset(\"mozilla-foundation/common_voice_8_0\", \"mr\", split=\"train+validation\", use_auth_token=True)\n", "common_voice_test = load_dataset(\"mozilla-foundation/common_voice_8_0\", \"mr\", split=\"test\", use_auth_token=True)\n", "common_voice_train = common_voice_train.remove_columns([\"accent\", \"age\", \"client_id\", \"down_votes\", \"gender\", \"locale\", \"segment\", \"up_votes\"])\n", "common_voice_test = common_voice_test.remove_columns([\"accent\", \"age\", \"client_id\", \"down_votes\", \"gender\", \"locale\", \"segment\", \"up_votes\"])\n", "print(common_voice_train)\n", "\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Dataset({\n", " features: ['path', 'audio', 'sentence'],\n", " num_rows: 2267\n", "})" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "train_data = concatenate_datasets([common_voice_train, openslr])\n", "train_data" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import re\n", "import unicodedata\n", "chars_to_remove_regex = '[,?.!\\-\\;\\:\"“%‘”�—’…–\\।\\!\\\"\\,\\-\\.\\?\\:\\|\\“\\”\\–\\;\\'\\’\\‘\\॔\\u200c\\u200d]'\n", "\n", "def remove_special_characters(batch):\n", " batch[\"sentence\"] = re.sub(chars_to_remove_regex, '', batch[\"sentence\"]).lower()\n", " batch[\"sentence\"] = unicodedata.normalize(\"NFKC\", batch[\"sentence\"])\n", " return batch" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Loading cached processed dataset at /home/ubuntu/.cache/huggingface/datasets/mozilla-foundation___common_voice/mr/8.0.0/b8bc4d453193c06a43269b46cd87f075c70f152ac963b7f28f7a2760c45ec3e8/cache-86933e1c6f2c17a9.arrow\n", "Loading cached processed dataset at /home/ubuntu/.cache/huggingface/datasets/mozilla-foundation___common_voice/mr/8.0.0/b8bc4d453193c06a43269b46cd87f075c70f152ac963b7f28f7a2760c45ec3e8/cache-0b71d94dfe9f8e07.arrow\n" ] } ], "source": [ "train_dataset = train_data.map(remove_special_characters)\n", "test_dataset = common_voice_test.map(remove_special_characters)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "def extract_all_chars(batch):\n", " all_text = \" \".join(batch[\"sentence\"])\n", " vocab = list(set(all_text))\n", " return {\"vocab\": [vocab], \"all_text\": [all_text]}" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "54586502931b4e99ab8e4cb90cb9fbc0", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/1 [00:00 main\n", "\n" ] }, { "data": { "text/plain": [ "'https://huggingface.co/smangrul/xls-r-300m-mr/commit/c87c689895462fd42a184ae74fffebe69a4078e8'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from transformers import Wav2Vec2CTCTokenizer\n", "\n", "tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(\"./\", unk_token=\"[UNK]\", pad_token=\"[PAD]\", word_delimiter_token=\"|\")\n", "tokenizer.push_to_hub(repo_name)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from transformers import Wav2Vec2FeatureExtractor\n", "\n", "feature_extractor = Wav2Vec2FeatureExtractor(feature_size=1, sampling_rate=16000, padding_value=0.0, do_normalize=True, return_attention_mask=True)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "from transformers import Wav2Vec2Processor\n", "\n", "processor = Wav2Vec2Processor(feature_extractor=feature_extractor, tokenizer=tokenizer)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "train_dataset = train_dataset.cast_column(\"audio\", Audio(sampling_rate=16_000))\n", "test_dataset = test_dataset.cast_column(\"audio\", Audio(sampling_rate=16_000))" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "def prepare_dataset(batch):\n", " audio = batch[\"audio\"]\n", "\n", " # batched output is \"un-batched\"\n", " batch[\"input_values\"] = processor(audio[\"array\"], sampling_rate=audio[\"sampling_rate\"]).input_values[0]\n", " batch[\"input_length\"] = len(batch[\"input_values\"])\n", " \n", " with processor.as_target_processor():\n", " batch[\"labels\"] = processor(batch[\"sentence\"]).input_ids\n", " return batch" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a096ebabad914b1f964e3a88f7763913", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/2267 [00:00 Dict[str, torch.Tensor]:\n", " # split inputs and labels since they have to be of different lenghts and need\n", " # different padding methods\n", " input_features = [{\"input_values\": feature[\"input_values\"]} for feature in features]\n", " label_features = [{\"input_ids\": feature[\"labels\"]} for feature in features]\n", "\n", " batch = self.processor.pad(\n", " input_features,\n", " padding=self.padding,\n", " return_tensors=\"pt\",\n", " )\n", " with self.processor.as_target_processor():\n", " labels_batch = self.processor.pad(\n", " label_features,\n", " padding=self.padding,\n", " return_tensors=\"pt\",\n", " )\n", "\n", " # replace padding with -100 to ignore loss correctly\n", " labels = labels_batch[\"input_ids\"].masked_fill(labels_batch.attention_mask.ne(1), -100)\n", "\n", " batch[\"labels\"] = labels\n", "\n", " return batch" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "data_collator = DataCollatorCTCWithPadding(processor=processor, padding=True)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "wer_metric = load_metric(\"wer\")" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "def compute_metrics(pred):\n", " pred_logits = pred.predictions\n", " pred_ids = np.argmax(pred_logits, axis=-1)\n", "\n", " pred.label_ids[pred.label_ids == -100] = processor.tokenizer.pad_token_id\n", "\n", " pred_str = processor.batch_decode(pred_ids)\n", " # we do not want to group tokens when computing the metrics\n", " label_str = processor.batch_decode(pred.label_ids, group_tokens=False)\n", "\n", " wer = wer_metric.compute(predictions=pred_str, references=label_str)\n", "\n", " return {\"wer\": wer}" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Some weights of the model checkpoint at facebook/wav2vec2-xls-r-300m were not used when initializing Wav2Vec2ForCTC: ['project_q.bias', 'project_q.weight', 'project_hid.weight', 'quantizer.weight_proj.bias', 'quantizer.codevectors', 'project_hid.bias', 'quantizer.weight_proj.weight']\n", "- This IS expected if you are initializing Wav2Vec2ForCTC from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n", "- This IS NOT expected if you are initializing Wav2Vec2ForCTC from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n", "Some weights of Wav2Vec2ForCTC were not initialized from the model checkpoint at facebook/wav2vec2-xls-r-300m and are newly initialized: ['lm_head.weight', 'lm_head.bias']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] } ], "source": [ "from transformers import Wav2Vec2ForCTC\n", "\n", "model = Wav2Vec2ForCTC.from_pretrained(\n", " \"facebook/wav2vec2-xls-r-300m\", \n", " attention_dropout=0.1,\n", " layerdrop=0.0,\n", " feat_proj_dropout=0.0,\n", " mask_time_prob=0.75,\n", " mask_time_length=10,\n", " mask_feature_prob=0.25,\n", " mask_feature_length=64,\n", " ctc_loss_reduction=\"mean\", \n", " pad_token_id=processor.tokenizer.pad_token_id,\n", " vocab_size=len(processor.tokenizer),\n", ")" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/ubuntu/transformers/src/transformers/models/wav2vec2/modeling_wav2vec2.py:1717: FutureWarning: The method `freeze_feature_extractor` is deprecated and will be removed in Transformers v5.Please use the equivalent `freeze_feature_encoder` method instead.\n", " FutureWarning,\n" ] } ], "source": [ "model.freeze_feature_extractor()" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "from transformers import TrainingArguments\n", "\n", "training_args = TrainingArguments(\n", " output_dir=repo_name,\n", " group_by_length=True,\n", " per_device_train_batch_size=16,\n", " gradient_accumulation_steps=2,\n", " evaluation_strategy=\"steps\",\n", " num_train_epochs=200,\n", " gradient_checkpointing=True,\n", " fp16=True,\n", " save_steps=400,\n", " eval_steps=400,\n", " logging_steps=100,\n", " learning_rate=1e-4,\n", " warmup_steps=1000,\n", " save_total_limit=1,\n", " push_to_hub=True,\n", ")" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/ebs/learn/ASR/smangrul/xls-r-300m-mr is already a clone of https://huggingface.co/smangrul/xls-r-300m-mr. Make sure you pull the latest changes with `repo.git_pull()`.\n", "Using amp half precision backend\n" ] } ], "source": [ "from transformers import Trainer\n", "\n", "trainer = Trainer(\n", " model=model,\n", " data_collator=data_collator,\n", " args=training_args,\n", " compute_metrics=compute_metrics,\n", " train_dataset=train_dataset,\n", " eval_dataset=test_dataset,\n", " tokenizer=processor.feature_extractor,\n", ")\n" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "The following columns in the training set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "/home/ubuntu/transformers/src/transformers/optimization.py:309: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use thePyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n", " FutureWarning,\n", "***** Running training *****\n", " Num examples = 2267\n", " Num Epochs = 200\n", " Instantaneous batch size per device = 16\n", " Total train batch size (w. parallel, distributed & accumulation) = 32\n", " Gradient Accumulation steps = 2\n", " Total optimization steps = 14200\n" ] }, { "data": { "text/html": [ "\n", "
\n", " \n", " \n", " [14200/14200 10:40:12, Epoch 200/200]\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
StepTraining LossValidation LossWer
4003.7940003.5322271.000000
8003.3624003.3590441.000000
12002.2939001.0112790.829924
16001.2330000.5027430.593662
20000.9626000.4125190.496992
24000.8318000.4029030.493783
28000.7370000.3897730.469314
32000.6771000.3739870.436021
36000.6344000.3838230.432010
40000.5860000.3756100.419575
44000.5610000.3878910.418371
48000.5185000.3863570.417569
52000.5153000.4150690.430004
56000.4781000.3992110.408744
60000.4681000.4245420.402327
64000.4394000.4309790.410750
68000.4296000.4277000.409146
72000.4003000.4511110.419976
76000.3951000.4634460.405134
80000.3818000.4547520.407942
84000.3715000.4615470.404733
88000.3625000.4615430.411151
92000.3382000.4682990.417168
96000.3388000.4809890.412355
100000.3176000.4757000.410750
104000.3151000.4789200.403530
108000.2962000.4806000.398315
112000.2990000.4770830.393502
116000.2900000.4656460.393903
120000.2909000.4900410.405937
124000.2756000.4893540.399519
128000.2726000.4945800.395909
132000.2659000.4979180.397112
136000.2663000.4986270.397513
140000.2596000.5046100.401524

" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-400/preprocessor_config.json\n", "Configuration saved in smangrul/xls-r-300m-mr/preprocessor_config.json\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-1200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-1200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-1200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-1200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-1600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-1600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-1600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-1600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-1200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-2000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-2000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-2000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-2000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-1600] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-2400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-2400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-2400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-2400/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-2000] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-2800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-2800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-2800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-2800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-2400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-3200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-3200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-3200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-3200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-2800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-3600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-3600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-3600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-3600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-3200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-4000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-4000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-4000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-4000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-3600] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-4400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-4400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-4400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-4400/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-4000] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-4800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-4800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-4800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-4800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-4400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-5200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-5200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-5200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-5200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-4800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-5600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-5600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-5600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-5600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-5200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-6000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-6000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-6000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-6000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-5600] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-6400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-6400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-6400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-6400/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-6000] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-6800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-6800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-6800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-6800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-6400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-7200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-7200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-7200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-7200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-6800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-7600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-7600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-7600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-7600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-7200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-8000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-8000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-8000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-8000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-7600] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-8400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-8400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-8400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-8400/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-8000] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-8800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-8800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-8800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-8800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-8400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-9200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-9200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-9200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-9200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-8800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-9600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-9600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-9600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-9600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-9200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-10000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-10000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-10000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-10000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-9600] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-10400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-10400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-10400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-10400/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-10000] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-10800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-10800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-10800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-10800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-10400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-11200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-11200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-11200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-11200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-10800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-11600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-11600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-11600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-11600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-11200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-12000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-12000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-12000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-12000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-11600] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-12400\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-12400/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-12400/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-12400/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-12000] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-12800\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-12800/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-12800/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-12800/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-12400] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-13200\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-13200/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-13200/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-13200/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-12800] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-13600\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-13600/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-13600/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-13600/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-13200] due to args.save_total_limit\n", "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length. If input_length are not expected by `Wav2Vec2ForCTC.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 306\n", " Batch size = 8\n", "Saving model checkpoint to smangrul/xls-r-300m-mr/checkpoint-14000\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-14000/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/checkpoint-14000/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/checkpoint-14000/preprocessor_config.json\n", "Deleting older checkpoint [smangrul/xls-r-300m-mr/checkpoint-13600] due to args.save_total_limit\n", "\n", "\n", "Training completed. Do not forget to share your model on huggingface.co/models =)\n", "\n", "\n" ] }, { "data": { "text/plain": [ "TrainOutput(global_step=14200, training_loss=0.8374653981437146, metrics={'train_runtime': 38417.9883, 'train_samples_per_second': 11.802, 'train_steps_per_second': 0.37, 'total_flos': 9.128944889276437e+19, 'train_loss': 0.8374653981437146, 'epoch': 200.0})" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trainer.train()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Saving model checkpoint to smangrul/xls-r-300m-mr\n", "Configuration saved in smangrul/xls-r-300m-mr/config.json\n", "Model weights saved in smangrul/xls-r-300m-mr/pytorch_model.bin\n", "Configuration saved in smangrul/xls-r-300m-mr/preprocessor_config.json\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6d6ee5a61abd46f4a91acb7e34864e06", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Upload file pytorch_model.bin: 0%| | 3.39k/1.18G [00:00 main (pre-receive hook declined)\n", "error: failed to push some refs to 'https://user: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@huggingface.co/smangrul/xls-r-300m-mr'\n", "\n" ] }, { "ename": "OSError", "evalue": "remote: -------------------------------------------------------------------------\u001b[31m \nremote: Your push was rejected because it contains files larger than 10M. \nremote: Please use https://git-lfs.github.com/ to store larger files.\u001b(B\u001b[m \nremote: ------------------------------------------------------------------------- \nremote: Offending files: \nremote: - language_model/unigrams.txt (ref: refs/heads/main) \nTo https://huggingface.co/smangrul/xls-r-300m-mr\n ! [remote rejected] main -> main (pre-receive hook declined)\nerror: failed to push some refs to 'https://user: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@huggingface.co/smangrul/xls-r-300m-mr'\n", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mCalledProcessError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m~/hf/lib/python3.7/site-packages/huggingface_hub/repository.py\u001b[0m in \u001b[0;36mgit_push\u001b[0;34m(self, upstream, blocking, auto_lfs_prune)\u001b[0m\n\u001b[1;32m 1018\u001b[0m raise subprocess.CalledProcessError(\n\u001b[0;32m-> 1019\u001b[0;31m \u001b[0mreturn_code\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mprocess\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutput\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstdout\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstderr\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstderr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1020\u001b[0m )\n", "\u001b[0;31mCalledProcessError\u001b[0m: Command '['git', 'push', '--set-upstream', 'origin', 'main']' returned non-zero exit status 1.", "\nDuring handling of the above exception, another exception occurred:\n", "\u001b[0;31mOSError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m/tmp/ipykernel_39173/1405518398.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtrainer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpush_to_hub\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;32m~/transformers/src/transformers/trainer.py\u001b[0m in \u001b[0;36mpush_to_hub\u001b[0;34m(self, commit_message, blocking, **kwargs)\u001b[0m\n\u001b[1;32m 2807\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2808\u001b[0m git_head_commit_url = self.repo.push_to_hub(\n\u001b[0;32m-> 2809\u001b[0;31m \u001b[0mcommit_message\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcommit_message\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mblocking\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mblocking\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mauto_lfs_prune\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2810\u001b[0m )\n\u001b[1;32m 2811\u001b[0m \u001b[0;31m# push separately the model card to be independant from the rest of the model\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/hf/lib/python3.7/site-packages/huggingface_hub/repository.py\u001b[0m in \u001b[0;36mpush_to_hub\u001b[0;34m(self, commit_message, blocking, clean_ok, auto_lfs_prune)\u001b[0m\n\u001b[1;32m 1252\u001b[0m \u001b[0mupstream\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34mf\"origin {self.current_branch}\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1253\u001b[0m \u001b[0mblocking\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mblocking\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1254\u001b[0;31m \u001b[0mauto_lfs_prune\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mauto_lfs_prune\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1255\u001b[0m )\n\u001b[1;32m 1256\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/hf/lib/python3.7/site-packages/huggingface_hub/repository.py\u001b[0m in \u001b[0;36mgit_push\u001b[0;34m(self, upstream, blocking, auto_lfs_prune)\u001b[0m\n\u001b[1;32m 1021\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1022\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0msubprocess\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mCalledProcessError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1023\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mEnvironmentError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexc\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstderr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1024\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1025\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mblocking\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mOSError\u001b[0m: remote: -------------------------------------------------------------------------\u001b[31m \nremote: Your push was rejected because it contains files larger than 10M. \nremote: Please use https://git-lfs.github.com/ to store larger files.\u001b(B\u001b[m \nremote: ------------------------------------------------------------------------- \nremote: Offending files: \nremote: - language_model/unigrams.txt (ref: refs/heads/main) \nTo https://huggingface.co/smangrul/xls-r-300m-mr\n ! [remote rejected] main -> main (pre-receive hook declined)\nerror: failed to push some refs to 'https://user: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@huggingface.co/smangrul/xls-r-300m-mr'\n" ] } ], "source": [ "trainer.push_to_hub()" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [], "source": [ "# train_dataset.save_to_disk(\"./Data/train_dataset\")" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "# test_dataset.save_to_disk(\"./Data/test_dataset\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "hf", "language": "python", "name": "hf" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" } }, "nbformat": 4, "nbformat_minor": 4 }