brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
generationConfigure Transformers text/chat generation, GenerationConfig, decoding controls, streamers, logits processors, stopping criteria, and continuous batching concepts without requiring model downloads.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill for Transformers workflows that need to design, validate, or troubleshoot text and chat generation behavior without downloading large models.
GenerationConfig or model.generate(...) arguments for greedy, sampling, beam, constrained, or custom generation.max_new_tokens, max_length, do_sample, temperature, top_p, top_k, num_beams, repetition_penalty, EOS, and padding controls.LogitsProcessor, LogitsProcessorList, StoppingCriteria, and StoppingCriteriaList.TextIteratorStreamer or related streamer classes.pipeline(...) task selection, device placement, and pipeline-only kwargs, use ../inference-pipelines/SKILL.md.../tokenizers-processors/SKILL.md.transformers chat, transformers serve, HTTP serving, and OpenAI-compatible endpoints, use ../serving-cli/SKILL.md.../quantization-integrations/SKILL.md.Trainer, TrainingArguments, or dataset preprocessing, use ../training/SKILL.md.../model-extension/SKILL.md.max_new_tokens for user-facing generation length; avoid relying on defaults.do_sample=False, num_beams=1), sampling (do_sample=True), beam (num_beams>1), or beam sampling (num_beams>1, do_sample=True).temperature, top_p, and top_k when do_sample=True.pad_token_id for batched decoder-only generation when the tokenizer has no pad token, commonly to eos_token_id for inference.tokenizer.apply_chat_template(...) instead of raw concatenated strings.GenerationConfig; use per-call kwargs for one-off overrides.torch and model weights.GenerationConfig(**kwargs) stores generation parameters and can be saved/loaded with save_pretrained(...) and from_pretrained(...).GenerationMixin.generate(...) is the generation entrypoint on compatible model classes.TextIteratorStreamer(tokenizer, skip_prompt=False, timeout=None, **decode_kwargs) supports iterator-style streaming from a background generation thread.LogitsProcessor and StoppingCriteria customize token selection and stopping rules.ContinuousBatchingConfig and ContinuousBatchingManager configure paged-KV continuous batching for serving-like generation.See references/api-reference.md for parameter groups and API decision notes.
Use the bundled smoke script to validate config shape and common contradictions without loading a model:
python scripts/generation_config_smoke.py \
--max-new-tokens 64 --do-sample --temperature 0.7 --top-p 0.9
Validate an existing JSON file:
python scripts/generation_config_smoke.py \
--config-json generation_config.json --strict
Expected success signal: the script prints OK generation config validated plus a normalized summary. Expected failure signal: it exits non-zero with ERROR and names the conflicting option.
references/workflows.md#choose-a-decoding-strategy.references/workflows.md#chat-generation-with-templates.references/workflows.md#streaming-generation.references/workflows.md#custom-logits-processors-and-stopping-criteria.references/continuous-batching.md.references/troubleshooting.md.When generation settings appear inside serving, pipeline, quantization, or chat-template requests, keep this sub-skill responsible for decoding semantics and route the outer workflow to the relevant sibling. For example, a serving/chat request with reasoning or chat_template_kwargs needs this sub-skill for GenerationConfig and chat generation choices, plus ../serving-cli/SKILL.md for endpoint behavior.
A minimal Transformers import can inspect GenerationConfig and many config utilities without PyTorch. Real AutoModelForCausalLM, model.generate(...), streamers attached to model execution, logits processors that operate on tensors, and continuous batching require backend dependencies such as torch; missing backends raise optional dependency ImportErrors. When writing agent instructions or tests, keep no-download config validation separate from model-backed generation checks.