Run this model with HF Jobs

Run ayertiam/phi3-nl2bash-lora-fixed 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-fixed. 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-fixed 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-fixed. 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-fixed. 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.
How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ayertiam/phi3-nl2bash-lora-fixed"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "ayertiam/phi3-nl2bash-lora-fixed",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/ayertiam/phi3-nl2bash-lora-fixed
Quick Links

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.
Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support