Run this model with HF Jobs

Run ayertiam/phi3-nl2bash-lora on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/ayertiam/phi3-nl2bash-lora. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/ayertiam/phi3-nl2bash-lora on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/ayertiam/phi3-nl2bash-lora. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/ayertiam/phi3-nl2bash-lora. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

phi3-nl2bash-lora

This repository contains LoRA adapter weights fine-tuned on the jiacheng-ye/nl2bash dataset to convert natural language instructions into Linux bash commands.

โš ๏ธ This repository contains LoRA adapters only, not the base model.
You must load these adapters on top of
microsoft/phi-3-mini-128k-instruct.


Intended use

The model is trained to output only valid bash commands, with no explanations.

Example

Input:

List all .txt files recursively and count lines

Output:

find . -name "*.txt" | xargs wc

Training summary

  • Base model: microsoft/phi-3-mini-128k-instruct
  • Fine-tuning method: LoRA (PEFT)
  • Trainer: TRL SFTTrainer
  • Dataset: jiacheng-ye/nl2bash
  • Output format: Bash commands only

Loading example

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base_model = "microsoft/phi-3-mini-128k-instruct"
lora_model = "ayertiam/phi3-nl2bash-lora"

tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    base_model,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)

model = PeftModel.from_pretrained(model, lora_model)
model.eval()

Notes

  • These adapters are model-specific and only compatible with microsoft/phi-3-mini-128k-instruct.
  • For Ollama or GGUF usage, the LoRA must be merged into the base model and converted before inference as done here https://huggingface.co/ayertiam/phi3-nl2bash-gguf
Downloads last month
5
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support