AGENT SKILL

nlp-and-generation

Use Libra for text classification, summarization, named entity recognition, GPT-2 text generation, image captioning, and NLTK/TextBlob runtime setup.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
nlp-and-generation
license
MIT
metadata
{ "disco-role": "operating" }
description
Use Libra for text classification, summarization, named entity recognition, GPT-2 text generation, image captioning, and NLTK/TextBlob runtime setup.
disable-model-invocation
true

02 资源文件 7

03 SKILL.md 正文

NLP and Generation with Libra

Load this sub-skill when the task uses Libra's text and language-generation APIs: sentiment/text classification, summarization, GPT-2 text generation, named entity recognition, image captioning, vocabulary inspection, or NLTK/TextBlob runtime setup.

What this sub-skill owns

  • text_classification_query(...) and classify_text(...)
  • summarization_query(...) and get_summary(...)
  • generate_text(...)
  • named_entity_query(...)
  • image_caption_query(...) and generate_caption(...)
  • NLTK corpora, TextBlob/POS-tagging assumptions, HuggingFace/TensorFlow model downloads, and NLP preprocessing helper behavior

Trigger phrases

Use this route when a user asks to:

  • train a sentiment or text classifier from a CSV and classify new text
  • fine-tune or use summarization on text/summary pairs
  • generate text from a file or prefix prompt
  • detect named entities in a text column
  • caption images from a CSV of image paths and captions
  • fix missing NLTK corpora, TextBlob tagging, or HuggingFace model download failures

Bundled references

  • references/api-reference.md for methods, model keys, and parameters
  • references/workflows.md for end-to-end recipes
  • references/data-formats.md for text, summary, generation, NER, and captioning data shapes
  • references/runtime-setup.md for NLTK, TextBlob, transformers, and optional GPU setup
  • references/troubleshooting.md for common NLP/generation failures

Bundled scripts

  • scripts/prepare_nltk_corpora.py checks required corpora and can optionally download them when network access is explicitly allowed.
  • scripts/smoke_text_generation.py checks the generate_text API surface without forcing a GPT-2 download by default.

Operating notes

  1. client.__init__ downloads NLTK punkt, averaged_perceptron_tagger, and stopwords; patch it only for non-NLP smoke checks that do not need corpora.
  2. text_classification_query defaults to label column label; summarization_query defaults to label column summary.
  3. generate_text(file_data=True) reads the client dataset path as a text file. Use file_data=False, prefix="..." when the user wants prompt-only generation.
  4. Transformer workflows load HuggingFace models and can require network/cache access. State this before running them.
  5. Image captioning is owned here because the public API lives with the NLP queries, but image-path/layout debugging should also consult sub-skills/vision-and-generative.

Cross-links

  • Use the root skill for global install and pandas compatibility shims.
  • Route tabular model selection and analyze()/plot workflows to sub-skills/tabular-modeling unless the model key is NLP-specific.
  • Route image classification, CNN export, GANs, and image dataset layout checks to sub-skills/vision-and-generative.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351