RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Evaluation metrics / F1 Score
Evaluation metrics

F1 Score

The F1 score is the harmonic mean of precision and recall, giving a single metric that balances false positives and false negatives. It ranges from 0 to 1, where 1 is perfect precision and recall. Operators encounter F1 when evaluating classification models, especially on imbalanced datasets where accuracy is misleading. For example, a model that always predicts the majority class may have high accuracy but F1 near 0. F1 is commonly reported in benchmarks for tasks like text classification or named entity recognition.

Practical example

When fine-tuning a BERT model for sentiment analysis on a dataset with 90% positive and 10% negative reviews, accuracy might be 90% if the model predicts positive always. F1 score for the negative class would be 0. A good model should have F1 > 0.8 for both classes. In practice, operators monitor F1 during training via validation splits.

Workflow example

In Hugging Face Transformers, after training a classifier, you compute F1 using from sklearn.metrics import f1_score on predictions vs labels. In llama.cpp, when evaluating a model on a classification task, you might calculate F1 from the output logits. In Ollama, you can script evaluation by sending prompts and comparing responses to ground truth.

Reviewed by Fredoline Eruo. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →