train-fasttext

Train FastText text classification models with accuracy and size constraints.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill train-fasttext-zurybr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: train-fasttext
Source: https://github.com/Zurybr/lefarma-skills/tree/main/letta/benchmarks/trajectory-only/train-fasttext
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill train-fasttext-zurybr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the challenge of training FastText text classification models efficiently, especially when needing to balance model accuracy with strict file size constraints.

Core Features & Use Cases

  • Hyperparameter Tuning: Guides systematic exploration of parameters like dim, epoch, lr, and wordNgrams to improve accuracy.
  • Size Optimization: Provides strategies to reduce model size by adjusting minCount, bucket, and dim, or by using quantization.
  • Use Case: You need to deploy a text classifier on a mobile device with limited storage. This skill helps you train a FastText model that meets both a minimum accuracy requirement and a maximum file size limit.

Quick Start

Use the train-fasttext skill to train a supervised FastText model on 'train.txt' aiming for high accuracy and a small model size.

Frequently Asked Questions about train-fasttext

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce FastText model size for deployment on mobile devices?

Reduce FastText model size by adjusting `minCount`, `bucket`, and `dim`, or by applying quantization. This strategy helps meet strict file size limits for resource-constrained deployments while maintaining accuracy.

What FastText hyperparameters should I tune for text classification accuracy?

Tune FastText hyperparameters like `dim`, `epoch`, `lr`, and `wordNgrams` to improve text classification accuracy. Systematic exploration of these parameters balances accuracy against strict file size constraints.

When should I use quantization for FastText models?

Use quantization for FastText models when deploying a text classifier under strict file size constraints. It reduces model size to satisfy resource limitations while maintaining required accuracy thresholds.

Can I balance accuracy and model size when training FastText?

Yes, you can balance accuracy and model size when training FastText by systematically tuning hyperparameters like `dim`, `epoch`, `lr`, and `wordNgrams` alongside size reduction strategies such as quantization.

What is the best way to train a FastText classifier under resource limitations?

The best way to train a FastText classifier under resource limitations is to optimize hyperparameters for accuracy and apply size reduction techniques like quantization to meet strict file size limits.

Why does my FastText model exceed the maximum file size limit?

Your FastText model exceeds the file size limit because of large `bucket` and `dim` values, or low `minCount`. Reduce these parameters or apply quantization to compress the model while maintaining accuracy.