Instructions to use arnabwithab/laya-android-control with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use arnabwithab/laya-android-control with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (8)
- README.mdAdded+26
- encoder/config.jsonAdded+84
- model.safetensorsAdded+3
- questions.jsonAdded+18
- rl_agent_config.jsonAdded+225
- tokenizer/tokenizer.jsonAdded
- tokenizer/tokenizer_config.jsonAdded+15
- train_report.jsonAdded+136
1234567891011121314151617181920212223242526---license: apache-2.0library_name: layatags: [laya, system-one, android, phone-agent, decision-model]---
# laya-ac-phone-v1
Laya-english (ModernBERT-large, 421M) fully finetuned with RLCD on AndroidControlphone-control steps converted to System One decisions (`operation` choice overTAP/TYPE/SCROLL/BACK/WAIT/DONE + `done` noul; state = goal + step history).
- Train: 18,354 rows, 4 epochs on Kaggle T4 (`eros438/phone-decisions-ac`)- Held-out operation accuracy (984 unseen goals): base 0.261 → **0.665**- In-sample calibration: acc 0.85, ECE 0.037
```pythonimport layaagent = laya.load("arnabwithab/laya-ac-phone-v1", device="cuda")agent.predict("Goal: ...", {"operation": {"type": "choice", "instructions": "Which operation moves this phone task forward?", "criteria": {"TAP": "...", "TYPE": "...", "SCROLL": "...", "BACK": "...", "WAIT": "...", "DONE": "..."}}})```
Serves via `laya-serve` (`LAYA_MODELS` pointing at this repo).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384{ "architectures": [ "ModernBertForMaskedLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 50281, "classifier_activation": "gelu", "classifier_bias": false, "classifier_dropout": 0.0, "classifier_pooling": "mean", "cls_token_id": 50281, "decoder_bias": true, "deterministic_flash_attn": false, "dtype": "float32", "embedding_dropout": 0.0, "eos_token_id": 50282, "global_attn_every_n_layers": 3, "gradient_checkpointing": false, "hidden_activation": "gelu", "hidden_size": 1024, "initializer_cutoff_factor": 2.0, "initializer_range": 0.02, "intermediate_size": 2624, "layer_norm_eps": 1e-05, "layer_types": [ "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "full_attention" ], "local_attention": 128, "max_position_embeddings": 8192, "mlp_bias": false, "mlp_dropout": 0.0, "model_type": "modernbert", "norm_bias": false, "norm_eps": 1e-05, "num_attention_heads": 16, "num_hidden_layers": 28, "pad_token_id": 50283, "position_embedding_type": "absolute", "repad_logits_with_grad": false, "rope_parameters": { "full_attention": { "rope_theta": 160000.0, "rope_type": "default" }, "sliding_attention": { "rope_theta": 10000.0, "rope_type": "default" } }, "sep_token_id": 50282, "sparse_pred_ignore_index": -100, "sparse_prediction": false, "tie_word_embeddings": true, "transformers_version": "5.16.1", "vocab_size": 50368}123version https://git-lfs.github.com/spec/v1oid sha256:a26bcdd619356e6810807e2931a620b730ce51b64873181025677716b6cb331esize 842609220123456789101112131415161718{ "operation": { "type": "choice", "instructions": "Which operation moves this phone task forward?", "criteria": { "TAP": "tap a control on screen", "TYPE": "type text into a field", "SCROLL": "scroll the screen", "BACK": "go back to the previous screen", "WAIT": "wait for the screen to settle", "DONE": "the goal is already achieved, do nothing" } }, "done": { "type": "noul", "instructions": "Is the phone task complete?" }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225{ "encoder": "answerdotai/ModernBERT-large", "head_layers": 2, "max_len": 512, "head_max_len": 192, "max_prefixes": 6, "act_costs": { "escalate": 0.5 }, "cost_wrong_act": 3.0, "amp_dtype": "bf16", "model_name": "rl-agent", "temperature": [ 2.3200724124908447, 1.0, 1.0 ], "training": { "updates": 7313, "epochs_completed": 1, "hours": 1.96, "world_size": 1, "fine_tuned_from_checkpoint": true, "laya_train": { "epochs": 4, "micro_batch": 8, "grad_accum": 8, "encoder_lr": 2.5e-05, "head_lr": 0.0001, "min_lr": 1e-06, "weight_decay": 0.01, "grad_clip": 1.0, "loss": "rlcd", "rl_samples": 4, "sigma_start": 0.4, "sigma_end": 0.1, "w_sph": 0.75, "w_rps": 1.0, "shuffle_options": [], "option_layout": null, "freeze_encoder": false, "calib_max": 400, "calib_frac": 0.1, "calib_seed": 20260922, "seed": 0, "max_len": null, "head_max_len": null, "amp": null, "gradient_checkpointing": null, "log_every": 100, "label_smoothing": 0.0, "text_column": "text", "label_column": "label", "question_id": "label", "instructions": null, "eval_data": null, "target_error": 0.1, "min_abstain_n": 10 }, "laya_train_calibration": { "choice": { "items": 197, "temperature": 2.3200724124908447, "issues": [], "accuracy": 0.700507614213198, "mean_confidence": 0.7349079253696408 }, "score": { "items": 0, "temperature": 1.0, "issues": [] }, "noul": { "items": 203, "temperature": 1.0, "issues": [ "the fit came back unchanged at 1.0 (accuracy 1.00, mean confidence 1.000 on the calibration items), which usually means they gave it nothing to correct; this type's confidences are uncalibrated" ], "accuracy": 1.0, "mean_confidence": 0.9999999999981326 } }, "train_report": { "eval_source": "calibration_slice", "eval_mode": "in_sample_calibration", "is_held_out": false, "eval_items": 400, "note": "Metrics reflect in-sample calibration fit, not independent held-out evaluation. Provide --eval for held-out validation.", "before": { "items": 400, "loss": 1.6005, "accuracy": 0.4, "mean_confidence": 0.6787, "ece": 0.2787, "brier": 0.7818, "brier_top1": 0.3007, "by_type": { "choice": { "items": 197, "loss": 2.5345, "accuracy": 0.2081, "mean_confidence": 0.6239, "ece": 0.4157, "brier": 1.079, "brier_top1": 0.3564 }, "noul": { "items": 203, "loss": 0.6941, "accuracy": 0.5862, "mean_confidence": 0.732, "ece": 0.1485, "brier": 0.4934, "brier_top1": 0.2467 } } }, "after": { "items": 400, "loss": 0.4219, "accuracy": 0.8525, "mean_confidence": 0.8694, "ece": 0.0372, "brier": 0.2124, "brier_top1": 0.0912, "by_type": { "choice": { "items": 197, "loss": 0.8566, "accuracy": 0.7005, "mean_confidence": 0.7349, "ece": 0.0755, "brier": 0.4313, "brier_top1": 0.1852 }, "noul": { "items": 203, "loss": 0.0, "accuracy": 1.0, "mean_confidence": 1.0, "ece": 0.0, "brier": 0.0, "brier_top1": 0.0 } } }, "comparison": { "delta_accuracy": 0.4525, "delta_loss": -1.1786, "delta_ece": -0.2415, "delta_brier": -0.5694, "delta_brier_top1": -0.2095, "delta_mean_confidence": 0.1907 }, "calibration": { "choice": { "items": 197, "temperature": 2.3200724124908447, "issues": [], "accuracy": 0.700507614213198, "mean_confidence": 0.7349079253696408 }, "score": { "items": 0, "temperature": 1.0, "issues": [] }, "noul": { "items": 203, "temperature": 1.0, "issues": [ "the fit came back unchanged at 1.0 (accuracy 1.00, mean confidence 1.000 on the calibration items), which usually means they gave it nothing to correct; this type's confidences are uncalibrated" ], "accuracy": 1.0, "mean_confidence": 0.9999999999981326 } }, "abstention_thresholds": { "choice:6-10": 0.8826, "noul:2": 1.0 }, "training": { "epochs": 4, "micro_batch": 8, "grad_accum": 8, "encoder_lr": 2.5e-05, "head_lr": 0.0001, "min_lr": 1e-06, "weight_decay": 0.01, "grad_clip": 1.0, "loss": "rlcd", "rl_samples": 4, "sigma_start": 0.4, "sigma_end": 0.1, "w_sph": 0.75, "w_rps": 1.0, "shuffle_options": [], "option_layout": null, "freeze_encoder": false, "calib_max": 400, "calib_frac": 0.1, "calib_seed": 20260922, "seed": 0, "max_len": null, "head_max_len": null, "amp": null, "gradient_checkpointing": null, "log_every": 100, "label_smoothing": 0.0, "text_column": "text", "label_column": "label", "question_id": "label", "instructions": null, "eval_data": null, "target_error": 0.1, "min_abstain_n": 10 } }, "abstention_thresholds": { "choice:6-10": 0.8826, "noul:2": 1.0 } }, "fine_tuned": true}123456789101112131415{ "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "local_files_only": false, "mask_token": "[MASK]", "model_input_names": [ "input_ids", "attention_mask" ], "model_max_length": 8192, "pad_token": "[PAD]", "sep_token": "[SEP]", "tokenizer_class": "PreTrainedTokenizerFast", "unk_token": "[UNK]"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136{ "eval_source": "calibration_slice", "eval_mode": "in_sample_calibration", "is_held_out": false, "eval_items": 400, "note": "Metrics reflect in-sample calibration fit, not independent held-out evaluation. Provide --eval for held-out validation.", "before": { "items": 400, "loss": 1.6005, "accuracy": 0.4, "mean_confidence": 0.6787, "ece": 0.2787, "brier": 0.7818, "brier_top1": 0.3007, "by_type": { "choice": { "items": 197, "loss": 2.5345, "accuracy": 0.2081, "mean_confidence": 0.6239, "ece": 0.4157, "brier": 1.079, "brier_top1": 0.3564 }, "noul": { "items": 203, "loss": 0.6941, "accuracy": 0.5862, "mean_confidence": 0.732, "ece": 0.1485, "brier": 0.4934, "brier_top1": 0.2467 } } }, "after": { "items": 400, "loss": 0.4219, "accuracy": 0.8525, "mean_confidence": 0.8694, "ece": 0.0372, "brier": 0.2124, "brier_top1": 0.0912, "by_type": { "choice": { "items": 197, "loss": 0.8566, "accuracy": 0.7005, "mean_confidence": 0.7349, "ece": 0.0755, "brier": 0.4313, "brier_top1": 0.1852 }, "noul": { "items": 203, "loss": 0.0, "accuracy": 1.0, "mean_confidence": 1.0, "ece": 0.0, "brier": 0.0, "brier_top1": 0.0 } } }, "comparison": { "delta_accuracy": 0.4525, "delta_loss": -1.1786, "delta_ece": -0.2415, "delta_brier": -0.5694, "delta_brier_top1": -0.2095, "delta_mean_confidence": 0.1907 }, "calibration": { "choice": { "items": 197, "temperature": 2.3200724124908447, "issues": [], "accuracy": 0.700507614213198, "mean_confidence": 0.7349079253696408 }, "score": { "items": 0, "temperature": 1.0, "issues": [] }, "noul": { "items": 203, "temperature": 1.0, "issues": [ "the fit came back unchanged at 1.0 (accuracy 1.00, mean confidence 1.000 on the calibration items), which usually means they gave it nothing to correct; this type's confidences are uncalibrated" ], "accuracy": 1.0, "mean_confidence": 0.9999999999981326 } }, "abstention_thresholds": { "choice:6-10": 0.8826, "noul:2": 1.0 }, "training": { "epochs": 4, "micro_batch": 8, "grad_accum": 8, "encoder_lr": 2.5e-05, "head_lr": 0.0001, "min_lr": 1e-06, "weight_decay": 0.01, "grad_clip": 1.0, "loss": "rlcd", "rl_samples": 4, "sigma_start": 0.4, "sigma_end": 0.1, "w_sph": 0.75, "w_rps": 1.0, "shuffle_options": [], "option_layout": null, "freeze_encoder": false, "calib_max": 400, "calib_frac": 0.1, "calib_seed": 20260922, "seed": 0, "max_len": null, "head_max_len": null, "amp": null, "gradient_checkpointing": null, "log_every": 100, "label_smoothing": 0.0, "text_column": "text", "label_column": "label", "question_id": "label", "instructions": null, "eval_data": null, "target_error": 0.1, "min_abstain_n": 10 }}README.mdAdded+26
encoder/config.jsonAdded+84
model.safetensorsAdded+3
questions.jsonAdded+18
rl_agent_config.jsonAdded+225
tokenizer/tokenizer.jsonAdded
tokenizer/tokenizer_config.jsonAdded+15
train_report.jsonAdded+136