Skip to content
CleverKeys Wiki
implemented v1.2.9 User guide

Neural Prediction Settings Technical Specification

Source Location Reference

All facts in the Neural Settings wiki page are sourced from:

FactSource FileLine(s)Value
Beam width defaultConfig.kt130NEURAL_BEAM_WIDTH = 6
Beam width range 1-32backup/SettingsValidation.kt-"neural_beam_width" -> value in 1..32
Max sequence length defaultConfig.kt115NEURAL_MAX_LENGTH = 20
Confidence threshold defaultConfig.kt116NEURAL_CONFIDENCE_THRESHOLD = 0.01f
ONNX threads defaultConfig.kt247ONNX_XNNPACK_THREADS = 2
ONNX threads range 1-8onnx/ModelLoader.kttryXnnpack()threadCount.coerceIn(1, 8)
Swipe typing default onConfig.kt90SWIPE_TYPING_ENABLED = true
Swipe on password default offConfig.kt91SWIPE_ON_PASSWORD_FIELDS = false
ONNX model formatonnx/ModelLoader.ktclassONNX Runtime Android
Beam search decoderneural/BeamSearchDecoder.ktclassVocabulary-constrained beam search

Key Components

ComponentFilePurpose
Neural DefaultsConfig.kt:Defaults (line 114-135)All default values
Settings UISettingsActivity.kt (line 1370-1450)Neural Prediction section
Model Loaderonnx/ModelLoader.ktONNX model initialization and XNNPACK config
Beam Decoderneural/BeamSearchDecoder.ktWord prediction from swipe trajectories
Prediction Engineneural/NeuralPredictionEngine.ktCoordinates model inference and ranking

Settings Preference Keys

Preference KeyTypeDefaultConfig.kt field
swipe_typingBooleantrueswipe_typing_enabled
swipe_on_passwordBooleanfalseswipe_on_password_fields
neural_beam_widthInt6neural_beam_width
neural_confidence_thresholdFloat0.01neural_confidence_threshold
neural_max_lengthInt20neural_max_length
onnx_xnnpack_threadsInt2onnx_xnnpack_threads
neural_frequency_weightFloat0.57neural_frequency_weight
neural_batch_beamsBooleanfalseneural_batch_beams