functionVerified releasev1
train_char_model
Train the typing-check GRU+attention char model on your lines and save it to a folder (requires torch).
Interface
Verified contract
Inputs
| Name | Type |
|---|---|
| lines | list |
| chr_to_idx | dict |
| output_dir | str |
| n_epochs | int |
| batch_size | int |
| embedding_size | int |
| hidden_size | int |
| attention_size | int |
| tail_size | int |
| num_layers | int |
| device | str |
| seed | int |
Outputs
| Name | Type |
|---|---|
| default | dict |
Exact release
Pinned local call
from spl import SPLClient
result = SPLClient.embedded().call(
"splime://@splime.project/typing-trainer/train_char_model@1",
kwargs={'attention_size': 0, 'batch_size': 0, 'chr_to_idx': {}, 'device': 'replace-with-value', 'embedding_size': 0, 'hidden_size': 0, 'lines': [], 'n_epochs': 0, 'num_layers': 0, 'output_dir': 'replace-with-value', 'seed': 0, 'tail_size': 0},
trust=True,
)Review before running. Public bundles contain executable code. Verify the publisher and exact content hash; a virtual environment isolates dependencies, not the operating system.
Evidence
Evidence-backed concepts
- Train char model
- Save folder
- Requires torch
- Chr idx
- N epochs
- Batch size
- Embedding size
- Hidden size
History
Public versions
- v10 downloads
Discover
Similar Objects
- train_typing_modelTrain your own typing model on your code: collect_code_lines -> build_char_vocab -> train_char_model (requires torch).
- generate_practice_lineGenerate one practice line from a trained typing-check model, optionally biased by keystroke_bias (requires torch).
- adaptive_typing_drillAdaptive typing drill: model_dir + keystroke log -> one practice line aimed at your weak spots (requires torch).
- train_topic_modelFit a simple TF-IDF and nonnegative matrix factorization topic model on supplied training titles only. Returns portable JSON vocabulary, IDF weights, learned components, automatic top-term names and a content identity; no rule-generated labels.
- keystroke_biasLogit-bias matrix from a keystroke log: hesitations, typos, slow and unexplored transitions. Steers any char model toward your weak spots (stdlib only).