返回
RCreddit.com
18
·19小时前·开发者社区 · RSS

Trained a 1.5B to write shell commands so I'd stop googling tar flags. Runs on a laptop CPU in ~1 sec.

查看原文
OpenAI模型发布

热度趋势

新上榜
最近 24 小时与此前 24 小时对比 · 7 天曲线

百分比基于当前可用热度信号,而非评论数或独立用户人数。

推荐理由

这条记录涉及编程工具或代码能力更新,适合开发者评估工作流变化和可复用价值。

AI 摘要

一位开发者训练了一个1.5B模型来生成shell命令,以减少频繁搜索“tar extract gz”等命令的需求。该模型在笔记本电脑CPU上运行大约1秒。它在InterCode-ALFA上获得了0.620分,优于未经调优的Qwen2.5-Coder-7B(0.613),并接近GPT-4o的0.73分,尽管参数量少得多。…

I've been googling "tar extract gz" for about ten years. and I finally did something about it.

It started out as a research project and I ended up with a Fine-tuned Qwen2.5-Coder-1.5B on 125k natural-language/command pairs, merged and quantized to Q4_K_M. 941MB which runs through llama.cpp. On my laptop (i5-11320H, 4 threads): 31.9 tok/s, 0.59s median per query, 1.6GB RAM.

I benchmarked it and it scores 0.620 on InterCode-ALFA. Untuned Qwen2.5-Coder-7B gets 0.613, GPT-4o gets 0.73. Not frontier, but it's roughly a 7B's answer at a quarter the parameters on a CPU. Theres a 3B variant too that scores higher.

There's also few static safety checker, because it will absolutely write a command that wipes your root if you ask it to:

I have published the weights: huggingface.co/ThorOdinson246/nl2sh-1.5b-Q4_K_M and Code: github.com/ThorOdinson246/whatisit-nl2sh. I posted few days ago in LocalLLM and it did well 300+ stars and so many good suggestions so I figured people here will be interested too.

Both Apache-2.0. If you want to poke holes in the method or you've got ideas, please comment or open a PR. A ⭐ helps if you find it useful.

Trained a 1.5B to write shell commands so I'd stop googling tar flags. Runs on a laptop CPU in ~1 sec. · BuzzRadr