Small Language Models for Cost-Effective Large-Scale Text Annotation
Large-scale annotation projects often face many labels, limited budgets, and tight turnaround times rather than a shortage of model capability. This article examines when sub-1B-parameter language models are worth evaluating for multilingual, multi-label text annotation in computational social science, psycholinguistics, and digital humanities. It compares lexicon- and rule-based methods, small language models, and large models; discusses language coverage, metaphor and sarcasm limits, and many-label task design; and outlines engineering practices for sharding, concurrency, retries, idempotency keys, failure queues, monitoring, and quality control. It also covers privacy and licensing checks.
As large language models continue to grow in parameter count, many teams face a different problem: large data volumes, many annotation categories, and limited budgets and response times. For these scenarios, small models under 1B parameters are worth serious evaluation. They may not be the most accurate on every task, but they often have a clear advantage in throughput per unit cost.
This article discusses where small models fit in computational social science, psycholinguistics, and digital humanities, and it provides practical engineering approaches. Performance judgments in this article should be validated on your own data; do not apply numbers from other projects directly.
1. Real Constraints in Large-Scale Annotation
Researchers often need to annotate the same set of texts along multiple dimensions. In psycholinguistics, commonly used lexicon-based tools count time orientation (past, present, future), social orientation, and the proportion of sensory-related words. Lexical norms such as Glasgow Norms provide scores for properties such as concreteness, valence, and arousal. Frameworks such as the Emotion Wheel require texts to be assigned to fine-grained emotion categories. Add tasks such as sarcasm, metaphor, and argumentative content, and a single text may need a dozen or more labels.
When data reaches the terabyte scale, sending all texts to a hundred-billion-parameter model for item-by-item inference forces teams to consider GPU occupancy, queue time, and billing at the same time. For many projects, the bottleneck is not model capability but budget and delivery timelines. In this situation, choosing a model tier is essentially a trade-off among accuracy, throughput, and cost.
2. Comparing Three Approaches
| Method | Advantages | Limitations | Best fit |
|---|---|---|---|
| Lexicons and regular-expression rules | Interpretable, fast, no GPU required | Hard to cover synonymous expressions; high maintenance cost across languages; cannot handle metaphor or sarcasm | Structured labels, such as whether a specific term appears |
| Language models under 1B parameters | Single-GPU deployment, high throughput, fine-tuning with small datasets | Long-tail tasks and low-resource languages need separate evaluation; limited complex reasoning | Initial multi-label screening and routine semantic classification for large text volumes |
| Large-parameter models | Stronger semantic understanding and reasoning | High cost and latency; hard to sustain for batch jobs | Review of difficult samples; annotation guideline development |
In practice, projects often combine all three. Rules handle clear structured fields, small models perform full-set initial labeling, and large models or human reviewers handle difficult samples and spot checks.
3. What Small Models Can and Cannot Do
Multilingual ability can be an advantage of small models, but results vary by language. When a language has a low share of the pretraining corpus, model performance may drop noticeably. Evaluate a few hundred samples per target language rather than looking only at overall accuracy.
For deep semantic tasks such as metaphor and sarcasm, small models can capture some contextual cues, but error rates can still be considerable. This is especially true for texts that depend on specific internet culture or current events, because the model often lacks the required background knowledge. For these tasks, build a human-annotated benchmark set first, then decide whether to assign the task to a model.
For annotation tasks with hundreds of labels, two approaches are common. One is to split labels into several task groups, with a separate prompt or fine-tuned model for each group, so that one model does not carry too many objectives and interfere with itself. The other is to merge or layer semantically similar labels to reduce confusion for both annotators and models. Either way, calculate metrics for each label separately rather than relying only on an average score.
Use precision, recall, and F1 as evaluation metrics. For data annotated by multiple people, also calculate inter-annotator agreement, such as Cohen’s kappa or Krippendorff’s alpha, to judge whether the label definitions themselves are clear.
4. Engineering Implementation
A large-scale annotation pipeline usually has five stages: reading data, preprocessing and deduplication, model inference, result validation, and structured write-back. Each stage should be able to run independently.
First, do not load all data into memory at once. Split data into shards by prefix or time window, and give each shard its own task ID. If a run fails midway, only the unfinished shards need to be rerun.
Second, limit concurrency. Set the concurrency level based on the inference service quota and actual latency; do not use a fixed large number. Start with a small concurrency level for load testing, record requests per second, P95 latency, and error rate, then increase gradually.
Third, set a retry limit and an idempotency key for each request. Network jitter and rate-limit errors are common, and retries should use exponential backoff. An idempotency key can be generated by concatenating the text ID, task name, and model version and then hashing the result, ensuring that repeated submissions do not produce duplicate results.
Fourth, set up a failure queue. Samples that exceed the retry limit go into a separate queue with error information for human inspection; they must not be silently dropped.
The pseudocode below illustrates this approach. The client interface and exception classes are hypothetical and should be adjusted to the SDK of the chosen platform.
import hashlibimport timefrom concurrent.futures import ThreadPoolExecutor, as_completedMAX_WORKERS = 32 # Set after load testing against service quotaMAX_RETRY = 4TASKS = ["emotion_wheel", "sarcasm_detection", "psycholinguistic_traits"]def idempotency_key(item_id, tasks, model_version):raw = f"{item_id}|{','.join(tasks)}|{model_version}"return hashlib.sha256(raw.encode("utf-8")).hexdigest()def annotate_one(client, item, model_version):key = idempotency_key(item["id"], TASKS, model_version)for attempt in range(MAX_RETRY):try:labels = client.predict(text=item["text"],tasks=TASKS,idempotency_key=key,)return {"id": item["id"], "ok": True, "labels": labels}except (RateLimitError, TransientError): # Defined by the SDK in usetime.sleep(2 ** attempt) # Exponential backoffreturn {"id": item["id"], "ok": False, "error": "max_retry_exceeded"}def run_shard(client, shard_items, model_version, write_ok, write_failed):with ThreadPoolExecutor(max_workers=MAX_WORKERS) as pool:futures = [pool.submit(annotate_one, client, item, model_version)for item in shard_items]for future in as_completed(futures):record = future.result()if record["ok"]:write_ok(record) # Write to the result tableelse:write_failed(record) # Write to the failure queue for review or rerun
The scheduling layer can use a message queue to distribute shard tasks, with one worker process handling each shard. Logs should record request count, successes, failures, and elapsed time per shard. A monitoring dashboard should show error rate and latency, with separate alert thresholds for each. Records in the failure queue can be resubmitted after the cause is fixed; because idempotency keys are used, resubmission will not create duplicate labels.
5. Quality Control
After each batch, randomly sample records for human review. Set the sampling rate by risk; categories involving sensitive or high-impact labels should receive more samples. Record the review accuracy. If it drops beyond a pre-agreed threshold, pause the batch and investigate the cause.
After a model version or prompt update, run regression tests on the same benchmark set. If the result distribution changes, do not replace the online version directly, because a shift in label distribution can affect downstream statistical conclusions.
6. Privacy, Licensing, and Compliance
Social media text often contains personally identifiable information, location, and health-related content. Before collecting and annotating data, confirm the terms of use for the data sources and obtain authorization or complete an ethics review where necessary. These checks should be completed before annotation begins.
