stop-sequencer
Implementation of stop sequencer for Huggingface Transformers
Decision gist · record as of 2026-08-14
No. The package is abandoned (last commit 2023-06-06, no activity for 1165 days) and has a critical limitation: stop sequences still appear in output and require manual post-processing. License metadata is unclear. For modern workflows, investigate native alternatives in the underlying framework.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Post-processing of generated text is mandatory due to Transformers API limitations—stop sequences may appear in output and must be manually stripped.
- High install friction with no runtime dependencies.
- Package is abandoned as of June 2023 with no commits since; last release was 1165 days ago.
License · maintenance · safety
(unclear) — License treatment is unclear—the description excerpt shows Apache 2.0 text, but the metadata records no SPDX identifier and an empty license_raw field. Verify the actual license before use.
last release 2023-06-06 (1165 days) · last repo commit 2023-06-06 · 16 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,572 downloads/mo, #14,513 on PyPI
Alternatives
Verify before relying
pip install stop-sequencer
from stop_sequencer import StopSequencer
stop_sequencer = StopSequencer(
model,
model_type="causal",
tokenizer=tokenizer,
)
model = stop_sequencer.register_stop_texts(
stop_texts=["Ryan:"],
input_length=tokens.size(-1),
)
outputs = model.generate(tokens, max_length=100)- Whether the package works with current versions of transformers (last tested June 2023)
- Compatibility with modern Huggingface Transformers API changes since abandonment
- Whether Apache 2.0 license is the actual governing license despite metadata ambiguity
What it is and what it does
Stop Sequencer is a wrapper that lets you stop text generation when the model produces a specified stop sequence. You register stop texts (like "Ryan:" or "Kevin:") before calling generate(), and the package attempts to halt output when those patterns appear. However, due to limitations in the underlying implementation, the stop sequence may still appear in the output—you must manually post-process the result to remove it completely.
The package has no runtime dependencies. It works with both causal and seq2seq model types. The main trade-off is that it stops generation after the stop text appears, not before, so you need to strip the unwanted text from the result yourself.
Use it for
- Dialogue generation where you want output to stop when a specific speaker's name appears
- Conditional text generation that should terminate at natural boundaries marked by specific tokens or phrases
- Multi-turn conversation simulation where each turn should end at a designated marker
- Controlled generation tasks where output length is bounded by semantic stop conditions rather than token limits alone
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last commit 2023-06-06, no activity for 1165 days) and has a critical limitation: stop sequences still appear in output and require manual post-processing. License metadata is unclear. For modern workflows, investigate native alternatives in the underlying framework.
Install
stop-sequencer on PyPI
Before you install
High install friction with no runtime dependencies. Package is abandoned as of June 2023 with no commits since; last release was 1165 days ago. Maintenance risk is significant for a specialized transformer integration.
Post-processing of generated text is mandatory due to Transformers API limitations—stop sequences may appear in output and must be manually stripped.
License in practice
License treatment is unclear—the description excerpt shows Apache 2.0 text, but the metadata records no SPDX identifier and an empty license_raw field. Verify the actual license before use.
Quickstart
pip install stop-sequencer
from stop_sequencer import StopSequencer
stop_sequencer = StopSequencer(
model,
model_type="causal",
tokenizer=tokenizer,
)
model = stop_sequencer.register_stop_texts(
stop_texts=["Ryan:"],
input_length=tokens.size(-1),
)
outputs = model.generate(tokens, max_length=100)
Verify before relying
- Whether the package works with current versions of transformers (last tested June 2023)
- Compatibility with modern Huggingface Transformers API changes since abandonment
- Whether Apache 2.0 license is the actual governing license despite metadata ambiguity
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,165 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,572 / month, #14,513 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries |
Evidence: stop-sequencer-1.2.3.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “stop sequence generation transformers”
- stop-sequencerAdds stop-sequence support to Huggingface Transformers text…
- rotary-embedding-torchImplements rotary positional embeddings for transformer attention…
- flairFlair is a PyTorch-based NLP framework that applies pre-trained…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also transformers-stream-generator · lm-format-enforcer · opentelemetry-instrumentation-transformers · transformers · tokie · tokenizers · sentence-transformers · adapters · semchunk · pytorch-pretrained-bert