Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NLLB Base CoreML Model
|
| 2 |
+
|
| 3 |
+
NLLB-200 (No Language Left Behind) の distilled 600M モデルを CoreML 形式に変換したものです。
|
| 4 |
+
|
| 5 |
+
## モデル情報
|
| 6 |
+
|
| 7 |
+
- **ベースモデル**: facebook/nllb-200-distilled-600M
|
| 8 |
+
- **対応言語**: 200言語(eng_Latn ↔ jpn_Jpan 等)
|
| 9 |
+
- **フォーマット**: CoreML (.mlpackage)
|
| 10 |
+
- **精度**: Float16
|
| 11 |
+
- **最小デプロイメントターゲット**: macOS 13.0
|
| 12 |
+
|
| 13 |
+
## ファイル構成
|
| 14 |
+
|
| 15 |
+
```
|
| 16 |
+
coreml/
|
| 17 |
+
├── NLLBEncoder.mlpackage/ # Encoder モデル
|
| 18 |
+
├── NLLBDecoder.mlpackage/ # Decoder モデル
|
| 19 |
+
├── sentencepiece.bpe.model # トークナイザー
|
| 20 |
+
└── tokenizer_config.json # トークナイザー設定
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
## 使用方法
|
| 24 |
+
|
| 25 |
+
```swift
|
| 26 |
+
import CoreML
|
| 27 |
+
|
| 28 |
+
// モデル読み込み
|
| 29 |
+
let encoder = try MLModel(contentsOf: encoderURL)
|
| 30 |
+
let decoder = try MLModel(contentsOf: decoderURL)
|
| 31 |
+
|
| 32 |
+
// 推論
|
| 33 |
+
// ... (TranslationEngine.swift を参照)
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## 言語コード
|
| 37 |
+
|
| 38 |
+
- `eng_Latn`: 256047 (英語)
|
| 39 |
+
- `jpn_Jpan`: 256079 (日本語)
|
| 40 |
+
|
| 41 |
+
## ライセンス
|
| 42 |
+
|
| 43 |
+
CC-BY-NC-4.0 (元モデルのライセンスに従う)
|
| 44 |
+
|
| 45 |
+
## 関連リンク
|
| 46 |
+
|
| 47 |
+
- [NLLB-200](https://huggingface.co/facebook/nllb-200-distilled-600M)
|
| 48 |
+
- [translation_subtitle](https://github.com/nawta/translation_subtitle)
|