Instructions to Upload to Hugging Face
This repository is ready to be pushed to Hugging Face Model Hub!
Quick Setup (5 minutes)
Step 1: Create Hugging Face Repository
- Go to https://huggingface.co/new
- Fill in:
- Model name:
nfqa-multilingual-classifier - License: Apache 2.0 (recommended) or your choice
- Visibility: Public (or Private if you prefer)
- Model name:
- Click "Create model"
- Important: Copy your repository URL from the page
Step 2: Get Your Access Token
- Go to https://huggingface.co/settings/tokens
- Click "New token"
- Name:
model-upload - Type: Write (important!)
- Click "Generate token"
- Copy the token (you won't see it again)
Step 3: Connect This Repository
Replace YOUR_USERNAME with your actual Hugging Face username:
cd /Users/alisalman/thesis/nfqa-multilingual-classifier
# Add Hugging Face as remote
git remote add origin https://huggingface.co/YOUR_USERNAME/nfqa-multilingual-classifier
# Configure git to use your HF credentials
git config credential.helper store
# Push to Hugging Face (you'll be prompted for username and token)
git push -u origin master
When prompted:
- Username: Your Hugging Face username
- Password: Paste your access token (not your password!)
Step 4: Verify Upload
- Go to
https://huggingface.co/YOUR_USERNAME/nfqa-multilingual-classifier - You should see:
- β All model files (11 files)
- β README with full documentation
- β Training visualizations (confusion matrix, training curves)
- β Model card with usage examples
- Test the Inference API widget with a question
Alternative: Use Hugging Face CLI
If you prefer using the CLI:
# Install if not already installed
pip install --upgrade huggingface_hub
# Login
huggingface-cli login
# Paste your token when prompted
# Create repository
huggingface-cli repo create nfqa-multilingual-classifier --type model
# Upload
cd /Users/alisalman/thesis/nfqa-multilingual-classifier
huggingface-cli upload nfqa-multilingual-classifier . --repo-type model
What's Included
This repository contains:
β Model Files (1.1 GB total):
model.safetensors- Model weightsconfig.json- Model configurationtokenizer.json- Tokenizertokenizer_config.json- Tokenizer settingssentencepiece.bpe.model- Vocabularyspecial_tokens_map.json- Special tokens
β Documentation:
README.md- Comprehensive model cardclassification_report.txt- Per-category performancetest_results.json- Detailed evaluation metrics
β Visualizations:
confusion_matrix.png- Test set confusion matrixtraining_curves.png- Training/validation curves
β Git Configuration:
.gitattributes- LFS tracking for large files.gitignore- Ignore patterns
Before You Push
Update README Placeholders
Edit README.md and replace:
[Your Name/Organization]β Your actual name[Specify your license]β Your license choiceyour-username/nfqa-multilingual-classifierβ Your actual repo URL[Your email]β Your contact email[Your repository]β Your GitHub repo (if any)
You can edit directly on Hugging Face after uploading, or do it now:
nano README.md
# or use your preferred editor
Troubleshooting
Error: "Repository not found"
- Make sure you created the repository on huggingface.co first
- Check that the username in the URL matches your HF username
Error: "Authentication failed"
- Make sure you're using your token as password, not your account password
- Verify the token has Write permissions
- Try
git credential rejectto clear cached credentials
Error: "Large file not properly tracked"
- LFS is already configured in this repo
- Just push normally, git-lfs will handle large files automatically
Upload is very slow
- The model is ~1.1 GB, this is normal
- It may take 5-15 minutes depending on your internet speed
- Git LFS uploads large files efficiently
After Upload
Test the model:
from transformers import pipeline classifier = pipeline("text-classification", model="YOUR_USERNAME/nfqa-multilingual-classifier") result = classifier("What is the capital of France?") print(result)Add widget examples in the README YAML front matter (optional)
Share your model on social media, papers, etc.
Monitor usage at
https://huggingface.co/YOUR_USERNAME/nfqa-multilingual-classifier/tree/main
Quick Reference
# View repository status
cd /Users/alisalman/thesis/nfqa-multilingual-classifier
git status
# View commit history
git log --oneline
# Check remote URL
git remote -v
# Push updates (after making changes)
git add .
git commit -m "Update model card"
git push
Need help?
- Hugging Face Docs: https://huggingface.co/docs/hub
- Git LFS Guide: https://git-lfs.github.com/
Ready to push? Follow Step 3 above!