Instructions to use c2pig/terminal-shell-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use c2pig/terminal-shell-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="c2pig/terminal-shell-mini")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("c2pig/terminal-shell-mini") model = AutoModelForCausalLM.from_pretrained("c2pig/terminal-shell-mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use c2pig/terminal-shell-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "c2pig/terminal-shell-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "c2pig/terminal-shell-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/c2pig/terminal-shell-mini
- SGLang
How to use c2pig/terminal-shell-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "c2pig/terminal-shell-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "c2pig/terminal-shell-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "c2pig/terminal-shell-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "c2pig/terminal-shell-mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use c2pig/terminal-shell-mini with Docker Model Runner:
docker model run hf.co/c2pig/terminal-shell-mini
terminal-shell-mini
Tiny GPT-2-style model that imitates Ubuntu 22.04 bash output and answers short questions about a session.
| Parameters | 3353088 |
| Git SHA | 47476878a75b3c7627704a60d6d0dc34ac2b8d23 |
| Tokenizer | byte-level BPE fit on the training text, plus chat markers |
| Training | GitHub Actions CPU runner, ml/config/tiny.yaml |
| Data | Synthetic ubuntu:22.04 sessions from ml/data/generate_sessions.py |
Prompt format
<|system|>
You are a Linux terminal on Ubuntu. ...
<|user|>
user@dev:~$ pwd
<|assistant|>
/home/user
<|end|>
The local server in serve/ turns OpenAI messages into this prompt.
Intended use
A toy terminal for terminal-gpt pointed at POST /v1/chat/completions. It is not a real shell, and it is not a general chatbot.
How this checkpoint was published
GitHub Actions workflow ML train uploaded this folder with HF_TOKEN. The git SHA above is the commit that produced the weights.
- Downloads last month
- 307