Instructions to use hwpoison89/gemma-1B-LinuxCLI-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hwpoison89/gemma-1B-LinuxCLI-GGUF", dtype="auto") - llama-cpp-python
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="hwpoison89/gemma-1B-LinuxCLI-GGUF", filename="gemma-1B-LinuxCLI-GGUF_BF16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16 # Run inference directly in the terminal: llama-cli -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16 # Run inference directly in the terminal: ./llama-cli -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
Use Docker
docker model run hf.co/hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
- LM Studio
- Jan
- Ollama
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with Ollama:
ollama run hf.co/hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
- Unsloth Studio
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for hwpoison89/gemma-1B-LinuxCLI-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for hwpoison89/gemma-1B-LinuxCLI-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for hwpoison89/gemma-1B-LinuxCLI-GGUF to start chatting
- Docker Model Runner
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with Docker Model Runner:
docker model run hf.co/hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
- Lemonade
How to use hwpoison89/gemma-1B-LinuxCLI-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull hwpoison89/gemma-1B-LinuxCLI-GGUF:BF16
Run and chat with the model
lemonade run user.gemma-1B-LinuxCLI-GGUF-BF16
List all available models
lemonade list
About this model
I trained the base model using the dataaset 'hrsvrn/linux-commands-updated' using 25s steps (loss 0.012000) to give commands according user input.
Suggested system prompt
You are a helpful assistant that outputs Linux shell commands. You just provide the command that the user is requesting, not more. Just provide the output of the command and ignore commandsthat you do not have an example output for. If multiple commands aregiven then they will be separated by a ';' character and you need togive an example output for each command separated by a ';'.
Script to use in linux bash
- Edit the bashrc with:
vim ~/.bashrc
- Add the next code at the end:
bind -x '"\C-o": llm_linux_cli' # Ctrl+O to run the model over current input line
llm_linux_cli() {
local salida
local USER_INPUT="$READLINE_LINE"
history -s "$READLINE_LINE"
SCRIPT=$(cat <<'EOF'
USER_INPUT=$(printf '%s' "$*" | sed 's/\\/\\\\/g; s/"/\\"/g')
if [ -z "$USER_INPUT" ]; then
echo "Uso: $0 \"Write something to the model\""
exit 1
fi
curl -s --url "http://localhost:8080/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer no-key" \
-d "{
\"model\": \"gpt-3.5-turbo\",
\"temperature\":0.8,
\"top_p\":0.95,
\"min_p\":0.05,
\"top_k\":40,
\"messages\":[
{
\"role\":\"system\",
\"content\":\"You are a helpful assistant that outputs Linux shell commands. You just provide the command that the user is requesting, not more. Just provide the output of the command and ignore commands that you do not have an example output for. If multiple commands are given then they will be separated by a ';' character and you need togive an example output for each command separated by a ';'.\"
},
{
\"role\": \"user\",
\"content\":\"$USER_INPUT\"
}
]
}" | jq -r '.choices[0].message.content'
EOF
)
llm_output=$(bash -c "$SCRIPT" _ $USER_INPUT)
READLINE_LINE=$llm_output
READLINE_POINT=${#llm_output}
}
- Reload the bashrc env file using:
source ~/.bashrc
- Load and run the .gguf model file using llama-server
llama-server -m gemma-1B-LinuxCLI-GGUF.gguf
- Now write your request as a command line then pres "CTRL+O" so a request will be sent to the model then the output replaced over current line :)
Collab
Uploaded finetuned model
- Developed by: hwpoison89
- License: apache-2.0
- Finetuned from model : unsloth/gemma-3-1b-it
This gemma3_text model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 22
8-bit
16-bit
