This is just a cheat sheet repo for how to upload tf models to the huggingface transformers website
- Install Hugging Face Hub:
$pip install huggingface_hub
- Log in:
$huggingface-cli login
- Create a repo:
$huggingface-cli repo create repo_name --type {model, dataset, space}
- Install git-lfs:
$git lfs install
- Clone your repo:
$git clone https://huggingface.co/username/repo_name
- Add files:
$git add .
- Commit changes:
$git commit -m "commit from $USER"
- Push to repo:
$git push
- Your repo can be accessed with:
username/repo_name
- Load tokenizer:
tokenizer = AutoTokenizer.from_pretrained("username/repo_name")
- Load model:
model = AutoModel.from_pretrained("username/repo_name")
【oaicite:0】
.