Files
live-app-translator/pyproject.toml
EJClaw 5596f905d1 fix: Seed-X 프롬프트 형식과 티어별 용어집 전략 수정
4티어(Seed-X-PPO-7B) 번역 경로가 모델 카드 요구사항을 어기고 있었다.

- 프롬프트 끝의 `<ko>` 등 대상 언어 태그가 빠져 있었다. PPO 학습에 쓰인
  신호라 없으면 번역 품질이 흔들린다.
- Seed-X 는 chat template 없는 번역 전용 completion 모델인데 "구어체로
  자연스럽게" 같은 지시문 래퍼를 씌우고 있었다. 학습 분포를 벗어난다.
- 그 결과 MTSpec.supports_prompt_glossary=True 가 사실과 달랐다.
  Seed-X 는 용어집 지시문을 이해하지 못하므로 플레이스홀더 치환을 써야 한다.

수정
- PromptStyle(NONE/SEEDX/INSTRUCT) 도입, supports_prompt_glossary 를
  prompt_style 에서 파생시켜 둘이 어긋날 수 없게 함
- build_seedx_prompt() 로 모델 카드 형식을 분리 (지시문 주입 불가)
- INSTRUCT 경로는 chat template 사용, Qwen3 thinking 모드는 끔
- LANGUAGES 에 seedx 태그 명시
- finetune_mt.py 가 티어의 prompt_style 을 따라가게 해 학습/추론 프롬프트 일치
- AWQ Int4 로드 실패 시 autoawq 설치 안내를 담은 오류 메시지

검증: pytest 52개 통과 (프롬프트 회귀 테스트 13개 추가), ruff clean

근거: https://huggingface.co/ByteDance-Seed/Seed-X-PPO-7B

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-21 10:56:49 +09:00

69 lines
1.5 KiB
TOML

[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "hearo"
version = "0.1.0"
description = "프로그램 소리를 실시간으로 듣고 번역해 자막으로 보여주는 도구"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [{ name = "tkrmagid" }]
dependencies = [
"PySide6>=6.6",
"numpy>=1.24",
]
[project.optional-dependencies]
# GPU 추론 (실사용에 필요). torch 는 CUDA 빌드를 따로 설치해야 한다 — README 참고.
gpu = [
"faster-whisper>=1.0",
"ctranslate2>=4.4",
"transformers>=4.44",
"huggingface-hub>=0.24",
"sentencepiece>=0.2",
]
# 4티어(Seed-X AWQ Int4) 전용 커널. 다른 티어에는 필요 없다.
awq = ["autoawq>=0.2.6"]
# Windows 오디오 캡처
windows = [
"PyAudioWPatch>=0.2.12.7",
"pycaw>=20240210",
"comtypes>=1.4",
"psutil>=5.9",
]
# 더 정확한 발화 구간 판정 (없어도 동작)
vad = ["webrtcvad-wheels>=2.0.14"]
# 추가학습 (LoRA)
finetune = [
"peft>=0.12",
"datasets>=2.20",
"accelerate>=0.33",
"bitsandbytes>=0.43; platform_system != 'Darwin'",
]
dev = ["pytest>=8.0", "ruff>=0.6"]
[project.scripts]
hearo = "hearo.app:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
hearo = ["resources/bin/*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM"]
ignore = ["E501", "B008"]