Skip to content

Instantly share code, notes, and snippets.

View IsSeck's full-sized avatar

Ismaila SECK, Ph.D IsSeck

  • African Institute for Mathematical Sciences - African Master of Machine Intelligence
  • Mbour, Thiès, Sénégal
View GitHub Profile
@IsSeck
IsSeck / hf_wav2vec2_run_pretrain.py
Last active October 11, 2022 16:42
This code was taken from the HuggingFace's transformers repo and modified since it did not work as was, especially it threw out of index error when using multiple GPUs. Now it can work with multiple GPUs.
#!/usr/bin/env python3
import logging
import sys
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
import torch
from datasets import DatasetDict, load_dataset
from packaging import version
from torch import nn