worship / QUICK_START.md
Peter Yang
Add test results and quick start guide
8a0921b

A newer version of the Gradio SDK is available: 6.13.0

Upgrade

Quick Start: Testing Qwen2.5 LLM Translation

πŸš€ Ready to Test!

Everything is set up. Follow these steps:

1. Install Dependencies

pip install -r requirements.txt

Note: First time will take a few minutes to download packages.

2. Check Everything is Installed

python check_dependencies.py

Should show βœ… for all required packages.

3. Run the Test

python test_llm_translation.py

First run: Will download Qwen2.5-1.5B model (~3GB) - takes 5-10 minutes
Subsequent runs: Uses cached model - much faster

4. Debug in Cursor/VSCode

  1. Open test_llm_translation.py
  2. Set a breakpoint (click left of line number)
  3. Press F5 (or Run β†’ Start Debugging)
  4. Select "Python: Test LLM Translation"
  5. Step through code and inspect variables

πŸ“ Files Created

  • βœ… test_llm_translation.py - Main test script
  • βœ… check_dependencies.py - Dependency checker
  • βœ… .vscode/launch.json - Debug configurations (local only)
  • βœ… LLM_SETUP.md - Detailed setup guide

πŸ› Troubleshooting

Missing packages?

pip install -r requirements.txt

bitsandbytes won't install?

  • macOS: May need conda or skip quantization
  • Windows: Use WSL or skip quantization
  • Linux: Usually works fine

Out of memory?

  • Use smaller model: Change to Qwen/Qwen2.5-0.5B-Instruct in test script
  • Or use quantization (already enabled by default)

Model download slow?

  • Normal on first run (3GB download)
  • Subsequent runs use cache

πŸ“Š What the Test Does

  1. Tests Model Loading

    • Loads Qwen2.5-1.5B-Instruct
    • Checks memory usage
    • Tests basic inference
  2. Tests Translation

    • Translates sample Chinese religious texts
    • Checks translation quality
    • Reports success rate
  3. Provides Detailed Logs

    • Shows what's happening
    • Reports errors clearly
    • Helps with debugging

🎯 Next Steps After Testing

Once tests pass locally:

  1. Integrate LLM translation into document_processing_agent.py
  2. Add toggle between OPUS-MT and LLM
  3. Test with real documents
  4. Deploy to HF Spaces

Need help? Check LLM_SETUP.md for detailed guide.