fl-style-transfer
Инструментарий переноса авторского стиля для LLM-агентов: строит профиль автора по его текстам (стилометрия, эмбеддинги, словарь функций абзацев) и поддерживает написание новых русских текстов в этом профиле — сборка промпта с авторскими примерами, детерминированная проверка содержания и формата, локальные правки.
Пакет не требует внешнего LLM API: генерация выполняется агентом, который использует пакет (своими субагентами); пакет делает тяжёлую обработку.
Установка
pip install fl-style-transfer
# или как инструмент без установки:
uvx fl-style-transfer --help
При первом запуске скачиваются модели (Stanza ru, эмбеддинги). Каталоги кэша/данных конфигурируемы:
| Переменная | Назначение | По умолчанию |
|---|---|---|
FL_STYLE_DATA_DIR |
профили, индексы | ~/.local/share/fl-style-transfer |
FL_STYLE_CACHE_DIR |
модели | ~/.cache/fl-style-transfer |
HF_HOME, STANZA_RESOURCES_DIR |
низкоуровневые кэши | внутри FL_STYLE_CACHE_DIR |
Если CUDA не нужна, уменьшите установку, поставив CPU-сборку torch заранее:
uv pip install torch --index https://download.pytorch.org/whl/cpu.
Команды
Профиль автора
# построить профиль из корпуса текстов (txt/md/docx/odt/pdf)
fl-style-transfer profile build --input corpus/author1 --output profiles/author1 --config ru.yaml
# посмотреть профиль
fl-style-transfer profile inspect profiles/author1
Сравнение текста с профилем (диагностика)
fl-style-transfer compare --profile profiles/author1 --text draft.md [--reference original.md] [--json]
Skill-режим (автономный навык для агента)
# первый запуск: профиль + формат-норма + задание на разметку абзацев
fl-style-transfer skill setup --skill-dir ~/.agents/skills/ghostwriter \
--corpus ~/.agents/skills/ghostwriter/corpus/author1 --author author1
# прогрев моделей в кэш навыка
fl-style-transfer skill warmup --skill-dir ~/.agents/skills/ghostwriter
# импорт разметки ролей абзацев, выполненной агентом (JSONL)
fl-style-transfer skill labels import --profile profiles/author1/ru-v1 --labels labels.jsonl
# сборка промпта генерации (авторские примеры + план) для субагента
fl-style-transfer skill retrieve --profile profiles/author1/ru-v1 \
--brief-file brief.md --plan-file plan.md --out prompt.md
# детерминированная проверка кандидата: якоря, формат, шаблонные конструкции
fl-style-transfer skill check --text candidate.md --brief-file brief.md \
--anchors anchors.json --profile profiles/author1/ru-v1
retrieve кладёт рядом с промптом prompt.json с рекомендованными
параметрами для вызываемого субагента (temperature 0.7, thinking off,
max_tokens 2200).
Эксперименты (research)
fl-style-transfer experiment run --profile profiles/author1 --output exp/001 --config ru.yaml
fl-style-transfer experiment evaluate exp/001
fl-style-transfer experiment judge exp/001 --config ru.yaml
Лицензия
MIT. Автор: Igor Beschastnov i.beschastnov@focuslabs.ru.
Metadata
Release files for fl-style-transfer 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fl_style_transfer-0.2.1.tar.gz | 85.7 kB | Without provenance | Details for fl_style_transfer-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fl_style_transfer-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for fl_style_transfer-0.2.1-py3-none-any.whl |
Total release size: 201.6 kB
Release files / fl_style_transfer-0.2.1.tar.gz
| Download URL | fl_style_transfer-0.2.1.tar.gz |
|---|---|
| Size | 85.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
860ee456f0e1fd1a28b3afeee30f6772067fdd9f324c81196700512447813d21
|
|
BLAKE2b-256 checksum How to use checksums |
b847f5124df72b86985b226215e1f56a0ac082e3f903a5e33fad4b1f3918be9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fl_style_transfer-0.2.1-py3-none-any.whl
| Download URL | fl_style_transfer-0.2.1-py3-none-any.whl |
|---|---|
| Size | 115.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcb6ccf8e092ac33b807b0075f745e0efebe9aa0ac269e16f23f7a0582726982
|
|
BLAKE2b-256 checksum How to use checksums |
b80969b51fa33485e9caa5585c954333f3f2feacd0f83a2c6eab61b254ff3f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fl-style-transfer 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.