This repo samples 100 CIFAR-10 images (10 per class), sends each image to an OpenAI‑compatible endpoint at https://ai.sooners.us using the gemma3:4b model, and logs predictions to compute accuracy and a confusion matrix.
- Python 3.9+ recommended
pip install -r requirements.txt
- Visit https://ai.sooners.us and sign up with your OU email.
- After logging in: Settings → Account → API Keys.
- Create a new API key and copy it.
Create ~/.soonerai.env and put the following code into the file.
SOONERAI_API_KEY=your_key_here
SOONERAI_BASE_URL=https://ai.sooners.us
SOONERAI_MODEL=gemma3:4b
python cifar10_classify.py
Setup summary:
10 images per CIFAR-10.
Model: gemma3:4b via https://ai.sooners.us/api/chat/completions.
Temperature = 0.0 for deterministic output.
Small objects or heavy background clutter. Low-contrast animal photos.
Explicit, short definitions yield the highest usable accuracy while maintaining valid single-word outputs.