开发者基于Qwen2.5-Coder-0.5B模型进行微调,训练了一个360M参数的终端仿真模型1。该模型通过学习键盘输入到屏幕变化的映射关系,能够模拟vim、tmux、Python REPL等应用程序的行为,并在一定程度上保持文件系统状态的一致性1。
在性能表现方面,该模型在ShellBench测试中正确运行78条命令(共106条),在PresetBench测试中得分38/47(int4版本),内存测试中精确回读64/641。推理延迟方面,M4 Mac上单字符输入约需60毫秒,较大的更新操作如man命令在顺序模式下约需2.5秒,使用并行验证则降至0.9秒1。
训练过程采用了多项优化技术1。开发者基于336个episodes(对应约2B tokens)的训练数据进行微调,训练成本约75个GPU小时(RTX 4090)1。模型通过DAgger方法学习自身错误修正,并采用并行行生成与投机性解码技术提升交互速度,同时使用语法约束解码确保输出正确性1。为实现浏览器内交互,开发者将原始494M参数的模型通过删除嵌入表缩小至360M,量化到int4后仅需208MB1。在知识蒸馏实验中,16层学生模型在内存测试中达到64/64的精确度,但ShellBench性能下降至65/1061。
A developer has fine-tuned a 360-million-parameter language model to emulate terminal operations, enabling it to run full-screen applications and maintain filesystem state consistency through keyboard input.1 The model, derived from Qwen2.5-Coder-0.5B and reduced from its original 494M parameters through embedding table pruning and int4 quantization to 208MB, was trained on 336,000 episodes corresponding to approximately 2 billion tokens—modest compared to the base model's exposure to around 18 trillion tokens.1 The training process required roughly 75 GPU hours on RTX 4090 hardware.1
The system demonstrates functional capability across multiple applications including vim, tmux, Python REPL, bash, and the snake game, with performance evaluated through ShellBench and PresetBench benchmarks.1 On ShellBench, the model correctly executed 78 out of 106 commands, while PresetBench achieved 38 out of 47 on the int4 version; memory tests showed 64 out of 64 responses accurately preserved filesystem state.1 Inference latency on an M4 Mac averages 60 milliseconds per character input for single-character commands, with larger updates such as man commands requiring approximately 2.5 seconds sequentially or 0.9 seconds using parallel verification.1
The implementation employs the DAgger methodology to teach the model error correction, combines parallel line generation with speculative decoding for optimization, and applies syntax-constrained decoding during inference.1 Knowledge distillation experiments reducing the model to 16 layers achieved perfect memory test results of 64 out of 64 responses but saw ShellBench performance decline to 65 out of 106 commands.1 The system achieves near-real-time interactive experience in a web browser environment.1
评论
还没有评论,欢迎留下第一条。