Skip to content

Instantly share code, notes, and snippets.

View ArtVanderlay's full-sized avatar
💭
I may be slow to respond.

ArtVanderlay

💭
I may be slow to respond.
View GitHub Profile
@ArtVanderlay
ArtVanderlay / average_checkpoints.py
Created March 27, 2021 03:02
checkpoint averaging script for huggingface models in pytorch
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Slightly tweaked version of https://github.com/pytorch/fairseq/blob/master/scripts/average_checkpoints.py
# To work with Huggingface wav2vec2
import argparse