Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sshleifer's full-sized avatar
🏠
Working from home

Sam Shleifer sshleifer

🏠
Working from home
View GitHub Profile
@astariul
astariul / benchmark.py
Created March 6, 2020 02:06
Quick benchmark to see the performance of BART between the FairSeq implementation and the HuggingFace implementation
import time
import torch
import argparse
from tqdm import tqdm
from transformers import BartForConditionalGeneration, BartTokenizer
FS_MODEL = "FairSeq"
HF_MODEL = "HuggingFace"
import logging
from transformers.modeling_bart import BartForSequenceClassification
from transformers.pipelines import TextClassificationPipeline
from transformers.tokenization_bart import BartTokenizer
logging.basicConfig(level=logging.INFO)
@sshleifer
sshleifer / apps.md
Last active September 1, 2023 15:12
My Favorite apps and workflow stuff (for mac/iOS/python)
@nazgob
nazgob / ctags.setup
Created January 6, 2012 13:44
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"