Translation
Transformers
Safetensors
t5
text2text-generation
codet5
nl2cmd
text-generation-inference
Instructions to use diethylene/codet5-small-nl2cmd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use diethylene/codet5-small-nl2cmd with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="diethylene/codet5-small-nl2cmd")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("diethylene/codet5-small-nl2cmd") model = AutoModelForSeq2SeqLM.from_pretrained("diethylene/codet5-small-nl2cmd", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,622 Bytes
4f77e34 e33cd62 4f77e34 e33cd62 4f77e34 e33cd62 4f77e34 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ---
base_model: Salesforce/codet5-small
base_model_relation: finetune
license: apache-2.0
library_name: transformers
pipeline_tag: translation
tags:
- codet5
- nl2cmd
- translation
---
This model is a fine-tuned version of [Salesforce/codet5-small](https://huggingface.co/Salesforce/codet5-small) on the combined datasets cited below, plus synthetically generated data based on the referenced datasets.
## Dataset Citations
- [westenfelder/NL2SH-ALFA](https://huggingface.co/datasets/westenfelder/NL2SH-ALFA) (MIT). Westenfelder et al., "LLM-Supported Natural Language to Bash Translation", NAACL 2025. DOI: [10.18653/v1/2025.naacl-long.555](https://doi.org/10.18653/v1/2025.naacl-long.555).
- [tldr-pages/tldr](https://github.com/tldr-pages/tldr) (CC BY 4.0). Copyright the tldr-pages team and contributors. Content was modified and normalized for training; pinned at commit 9772284fdecc17e1e72a671a773460b96ac75078. License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
- [magnumresearchgroup/bash_gen](https://github.com/magnumresearchgroup/bash_gen) (ChatGPT-generated bash). Fu et al., "A Transformer-based Approach for Translating Natural Language to Bash Commands" and "NL2CMD: An Updated Workflow for Natural Language to Bash Commands Translation".
## Intended uses
The intent of this model is to translate natural language into bash commands, primarily for linux as of now. Use with caution, it WILL happily issue destructive commands if you let it.
## Framework versions
- transformers 4.57.6
- torch 2.13.0+cu130
- optimum 2.1.0
- optimum-onnx 0.1.0
- onnxruntime 1.28.0
- onnx 1.22.0
|