Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Invode the conda environment gpt_neo_generation before running this file. | |
Specify the prompt in prompt.txt | |
""" | |
from transformers import GPTNeoForCausalLM, GPT2Tokenizer | |
import time | |
def main(): | |
start_time = time.time() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. | |
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
# Copyright 2020 The HuggingFace Inc. team. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model Name | WER | Inference Time | Model Size | # of Parameters | Hardware | |
---|---|---|---|---|---|---|
wav2vec_big_960h | 2.63% | 4433 s | 1262 mb | 317 M | CPU (8 cores) | |
Quantized wav2vec_big_960h | 2.75% | 4079 s | 354 mb | 317 M | CPU (8 cores) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model Name | # of Parameters | Model Size | CPU (8 cores ) Inference Time | GPU Inference Time | WER | |
---|---|---|---|---|---|---|
wav2vec_big_960h | 317 M | 1262 mb | 4433 s | 123 s | 2.63% | |
Student wav2vec 2.0 | 65 M | 262 mb | 1560 s | 51 s | 9.51% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model Name | WER | Inference Time | Model Size | # of Parameters | |
---|---|---|---|---|---|
wav2vec_big_960h | 2.63% | 123 s | 1262 mb | 317 M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jiwer import wer | |
wer_score = wer(ground_truths, predictions) |
NewerOlder