Compare commits
1 Commits
v0.3.0-tes
...
v0.3.0-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dde1b2aaa |
@@ -120,7 +120,7 @@ SWIFT = _register(
|
||||
order=2,
|
||||
name="신속",
|
||||
tagline="빠르면서 인식률은 최상급",
|
||||
asr=AsrSpec("Systran/faster-whisper-large-v3-turbo", "int8_float16", 1, 1600),
|
||||
asr=AsrSpec("dropbox-dash/faster-whisper-large-v3-turbo", "int8_float16", 1, 1600),
|
||||
mt=MTSpec(
|
||||
"entai2965/nllb-200-distilled-600M-ctranslate2",
|
||||
MTBackend.CTRANSLATE2,
|
||||
@@ -140,7 +140,7 @@ BALANCE = _register(
|
||||
order=3,
|
||||
name="균형",
|
||||
tagline="기본값 · 속도와 품질의 중간",
|
||||
asr=AsrSpec("Systran/faster-whisper-large-v3-turbo", "float16", 2, 2400),
|
||||
asr=AsrSpec("dropbox-dash/faster-whisper-large-v3-turbo", "float16", 2, 2400),
|
||||
mt=MTSpec(
|
||||
"entai2965/nllb-200-distilled-1.3B-ctranslate2",
|
||||
MTBackend.CTRANSLATE2,
|
||||
@@ -160,7 +160,7 @@ PRECISION = _register(
|
||||
order=4,
|
||||
name="정밀",
|
||||
tagline="추천 · 현 시점 최고 번역 품질",
|
||||
asr=AsrSpec("Systran/faster-whisper-large-v3-turbo", "float16", 2, 2400),
|
||||
asr=AsrSpec("dropbox-dash/faster-whisper-large-v3-turbo", "float16", 2, 2400),
|
||||
mt=MTSpec(
|
||||
"ByteDance-Seed/Seed-X-PPO-7B-AWQ-Int4",
|
||||
MTBackend.TRANSFORMERS,
|
||||
|
||||
37
tests/test_model_repos.py
Normal file
37
tests/test_model_repos.py
Normal file
@@ -0,0 +1,37 @@
|
||||
"""티어에 적힌 Hugging Face 저장소가 실제로 로그인 없이 받아지는지 확인한다.
|
||||
|
||||
저장소 이름이 틀리면 사용자 PC에서 "번역 시작"을 누를 때 401/404 로 처음 드러난다.
|
||||
(v0.3.0-test4: 존재하지 않는 Systran/faster-whisper-large-v3-turbo 를 가리키고 있었다.)
|
||||
네트워크가 없으면 건너뛴다.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from livesub.models.tiers import TIERS
|
||||
|
||||
huggingface_hub = pytest.importorskip("huggingface_hub")
|
||||
|
||||
|
||||
def _repos() -> list[str]:
|
||||
return sorted({r for t in TIERS.values() for r in (t.asr.repo, t.mt.repo)})
|
||||
|
||||
|
||||
def _online() -> bool:
|
||||
try:
|
||||
huggingface_hub.HfApi().model_info("Systran/faster-whisper-small", token=False)
|
||||
except Exception:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@pytest.mark.parametrize("repo", _repos())
|
||||
def test_repo_is_public_and_has_weights(repo):
|
||||
if not _online():
|
||||
pytest.skip("Hugging Face 에 접속할 수 없음")
|
||||
info = huggingface_hub.HfApi().model_info(repo, token=False)
|
||||
assert not info.private
|
||||
assert not info.gated
|
||||
files = {s.rfilename for s in info.siblings}
|
||||
assert files & {"model.bin", "model.safetensors"} or any(
|
||||
f.endswith(".safetensors") for f in files
|
||||
), f"{repo}: 가중치 파일이 없음 ({sorted(files)})"
|
||||
Reference in New Issue
Block a user