Spaces:
Sleeping
Sleeping
π€ Team Collaboration Guide
Quick Reference for Updating the Deployed App
Space URL: https://huggingface.co/spaces/dianacasti/personality-chatbot
I just trained a better adapter. How do I update it?
Option A: Direct Upload (No Git Required) β EASIEST
- Ask dianacasti to add you as a collaborator on the Space
- Go to: https://huggingface.co/spaces/dianacasti/personality-chatbot
- Click "Files" tab at the top
- Find the old adapter folder (e.g.,
nerd-lora-adapter) - Click the trash icon to delete it
- Click "Add file" β "Upload files"
- Drag and drop your entire new adapter folder OR upload files individually:
adapter_model.safetensors(the weights)adapter_config.jsontokenizer.json,tokenizer_config.json,vocab.json,merges.txtspecial_tokens_map.json,added_tokens.jsonchat_template.jinja
- Write a commit message: "Updated nerd adapter with 50 training examples"
- Click "Commit changes to main"
- Wait 2-5 minutes for rebuild
- Test at: https://dianacasti-personality-chatbot.hf.space
Done! β
Option B: Using Git (For Advanced Users)
# One-time setup
git clone https://huggingface.co/spaces/dianacasti/personality-chatbot
cd personality-chatbot
# Every time you update
# 1. Copy your new adapter folder to replace the old one
cp -r C:\path\to\your\nerd-lora-adapter .\nerd-lora-adapter
# 2. Commit and push
git add .
git commit -m "Updated nerd adapter - trained with 50 examples, loss 0.018"
git push
# 3. Wait for rebuild and test
Common Tasks
β Replace an existing adapter (Nerd, Yoda, Pirate)
- Use Option A above (direct upload is easiest)
β Test adapters locally before uploading
cd C:\Users\dcast\LLM\Project3\llm-project
# Replace the adapter folder with your new one
# Then run locally:
python app.py
# Test at http://localhost:7860
# If good, upload to Hugging Face using Option A
β Check current training loss/quality
- Nerd: loss 0.018 (50 examples Γ 10)
- Yoda: loss 0.0165 (50 examples Γ 10)
- Brainrot: loss 0.21 (large dataset)
- Pirate: original (5 examples)
Lower loss = better memorization, but might overfit if too low
β Add a brand new personality
- Train your new adapter (e.g.,
cowboy-lora-adapter) - Upload the adapter folder using Option A
- Edit
app.py(Files tab β clickapp.pyβ edit icon):ADAPTERS = { "π§ Brainrot": "qwen-brainrot-lora-stage1-final", "π΄ββ οΈ Pirate": "pirate-lora-adapter", "π§ Yoda": "yoda-lora-adapter", "π€ Nerd": "nerd-lora-adapter", "π€ Cowboy": "cowboy-lora-adapter", # ADD THIS LINE } - Scroll down to personality descriptions and add:
- **π€ Cowboy**: Yeehaw, talks like a Wild West cowboy! - Commit changes
Troubleshooting
"I don't see the Files tab"
β You need to be added as a collaborator. Ask dianacasti.
"Space is stuck building"
β Check the "Logs" tab for errors. Common issues:
- Missing files in adapter folder
- File names don't match (should be
adapter_model.safetensors, notmodel.safetensors)
"Adapter not loading"
β Make sure adapter folder contains ALL files:
- adapter_model.safetensors β
- adapter_config.json β
- tokenizer files (5-6 files) β
- chat_template.jinja β
"How do I test without breaking the live app?"
β Clone locally and test with python app.py before uploading
Training Tips for Better Adapters
Current approach: 5 examples Γ 50 repetitions = 250 training samples (overfits easily)
Better approach: 50 unique examples Γ 3 epochs
- More diverse conversations
- Less overfitting
- Better generalization
Example training data structure:
train_data = [
{"messages": [
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Ahoy matey!"}
]},
# ... 49 more unique examples
] * 3 # Repeat 3 times instead of 50
Contact
- Space Owner: dianacasti
- Project Lead: Theworst1
- Contributors: Bryn Ramirez, diana
For issues or questions, post in the team Discord!