Skip to main content

LLM Japanese Kana-Kanji convetor

Project description

pyuino

pyuino は LLM の仕組みを利用したかな漢字変換です
厳密には Qwen3 モデルがベースになっていますが、入出力が変わっているため llama.cpp 等では 動かない ことを確認済みです

まだお試し版です。まともに動かないです。

インストール

PyPi からインストールできます

pip install pyuino

モデル・辞書ファイルの準備

下記の場所からモデルファイル及び辞書ファイルをダウンロードしてください
https://www.dropbox.com/scl/fo/03sverk4gsj3l8qmx9ltw/ACueNBsN8EwwSYP18v2a1lQ?rlkey=99ki15e75q3cx9ddmotzgcpah&st=2n8rooyz&dl=0

  • config.json
  • model.safetensors
  • yuino_dict.pb

ダウンロードしたファイルは YuinoLM 下に配置してください

ToyBox の起動

ToyBox は pyuino のデモアプリケーションです
かなを入力すると、変換後のかな漢字を返します

$ pyuino-toybox
--Yuino TOY-BOX--
かな > はこねおんせんへようこそ
0.5473639369010925 ['[CLS]', '羽']
0.5501382946968079 ['[CLS]', '筐']
0.6909381747245789 ['[CLS]', 'はこね']
1.3568682670593262 ['[CLS]', 'はこね', 'お']
1.3223243355751038 ['[CLS]', '筐', 'ネオン']
1.4771115183830261 ['[CLS]', 'はこね', 'オンセ']
0.6929624676704407 ['[CLS]', '箱根温泉']
1.1179965436458588 ['[CLS]', '箱根温泉', 'へ']
1.5004573464393616 ['[CLS]', '箱根温泉', 'へよ']
1.525723159313202 ['[CLS]', '箱根温泉', 'へよう']
1.8744302093982697 ['[CLS]', '箱根温泉', 'へ', '楊子']
1.8722382485866547 ['[CLS]', '箱根温泉', 'へ', 'ようこそ']
箱根温泉へようこそ : 0.990405 sec
漢字: 箱根温泉へようこそ

サーバーの起動

現在 IBus-Anya を利用することを想定します
IBus-Anya 起動前に、下記コマンドでサーバー側を起動してください

docker run -d -p 30055:30055 -v $HOME/.local/share/yuino:/opt/pyuino/YuinoLM ghcr.io/yuino-im/pyuino -m /opt/pyuino/YuinoLM

使用モデル・データセット

Yuino では下記のモデル、及びデータセットを使用して学習しました
(ありがとうございます!!)

辞書

SudachiDict (WorksApplications)
https://github.com/WorksApplications/SudachiDict

LLMトークナイザ

LINE DistilBERT Japanese (LINE Corporation)
https://huggingface.co/line-corporation/line-distilbert-base-japanese

データセット

CC100(Japanese)
https://huggingface.co/datasets/range3/cc100-ja

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyuino-0.0.7.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyuino-0.0.7-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file pyuino-0.0.7.tar.gz.

File metadata

  • Download URL: pyuino-0.0.7.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyuino-0.0.7.tar.gz
Algorithm Hash digest
SHA256 bd25fb83c08c4f6980b0289aee51d7a9154a23067c1fa331351ecaf46369ef75
MD5 6725f87af6e679f341663de9e4fb9221
BLAKE2b-256 7f5f9cb5f1b4bb895188d2dc6fecc87ba6e201b90b17f7766607813eb05878bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuino-0.0.7.tar.gz:

Publisher: release.yml on yuino-im/pyuino

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyuino-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: pyuino-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyuino-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cddad2cf58d72337f369cc7c2a836949fe7cb1b4ab5fcc0bcf1ccd8a6a69a013
MD5 924aecf7840c23789c04ccdc36c6cfb9
BLAKE2b-256 245c3842b8149ce0bafbd9b8e0d7ed685f1e0f931a29bc9d497f164b24ed7747

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuino-0.0.7-py3-none-any.whl:

Publisher: release.yml on yuino-im/pyuino

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page