Instructions to use dereklck/kubernetes_operator_3b_peft_gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dereklck/kubernetes_operator_3b_peft_gguf with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dereklck/kubernetes_operator_3b_peft_gguf", dtype="auto") - llama-cpp-python
How to use dereklck/kubernetes_operator_3b_peft_gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dereklck/kubernetes_operator_3b_peft_gguf", filename="unsloth.Q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use dereklck/kubernetes_operator_3b_peft_gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
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 dereklck/kubernetes_operator_3b_peft_gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
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 dereklck/kubernetes_operator_3b_peft_gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
Use Docker
docker model run hf.co/dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
- LM Studio
- Jan
- Ollama
How to use dereklck/kubernetes_operator_3b_peft_gguf with Ollama:
ollama run hf.co/dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
- Unsloth Studio new
How to use dereklck/kubernetes_operator_3b_peft_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 dereklck/kubernetes_operator_3b_peft_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 dereklck/kubernetes_operator_3b_peft_gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dereklck/kubernetes_operator_3b_peft_gguf to start chatting
- Pi new
How to use dereklck/kubernetes_operator_3b_peft_gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "dereklck/kubernetes_operator_3b_peft_gguf:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use dereklck/kubernetes_operator_3b_peft_gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use dereklck/kubernetes_operator_3b_peft_gguf with Docker Model Runner:
docker model run hf.co/dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
- Lemonade
How to use dereklck/kubernetes_operator_3b_peft_gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dereklck/kubernetes_operator_3b_peft_gguf:Q8_0
Run and chat with the model
lemonade run user.kubernetes_operator_3b_peft_gguf-Q8_0
List all available models
lemonade list
๐ง Fixing the Issue ... ๐ง
Hybrid Kubernetes Feature Model
- Developed by: dereklck
- License: Apache-2.0
- Fine-tuned from model: unsloth/Llama-3.2-3B-Instruct-bnb-4bit
- Model type: GGUF (compatible with Ollama)
- Language: English
This Llama-based model was fine-tuned to assist users with Kubernetes commands and questions. It has three primary features:
- Generating accurate
kubectlcommands based on user descriptions. - Providing concise explanations about Kubernetes for general queries.
- Politely requesting additional information if the instruction is incomplete or ambiguous.
Update: Compared to the previous 1B model, the 3B model significantly reduces hallucinations that sometimes occurred in the 1B model. Users can expect improved accuracy and reliability when interacting with this model.
The model was trained efficiently using Unsloth and Hugging Face's TRL library.
How to Use the Model
This section provides instructions on how to run the model using Ollama and the provided Modelfile.
Prerequisites
- Install Ollama on your system.
- Ensure you have access to the model hosted on Hugging Face:
hf.co/dereklck/kubernetes_operator_3b_peft_gguf.
Steps
Create the Modelfile
Save the following content as a file named
Modelfile:FROM hf.co/dereklck/kubernetes_operator_3b_peft_gguf PARAMETER temperature 0.3 PARAMETER stop "</s>" TEMPLATE """ You are an AI assistant that helps users with Kubernetes commands and questions. **Your Behavior Guidelines:** 1. **For clear and complete instructions:** - **Provide only** the exact `kubectl` command needed to fulfill the user's request. - Do not include extra explanations, placeholders, or context. - **Enclose the command within a code block** with `bash` syntax highlighting. 2. **For incomplete or ambiguous instructions:** - **Politely ask** the user for the specific missing information. - Do **not** provide any commands or placeholders in your response. - Respond in plain text, clearly stating what information is needed. 3. **For general Kubernetes questions:** - Provide a **concise and accurate explanation**. - Do **not** include any commands unless specifically requested. - Ensure that the explanation fully addresses the user's question. **Important Rules:** - **Do not generate CLI commands containing placeholders (e.g., <pod_name>, <resource_name>).** - Ensure all CLI commands are complete, valid, and executable as provided. - If user input is insufficient to form a complete command, ask for clarification instead of using placeholders. - Provide only the necessary CLI command output without any additional text. ### Instruction: {{ .Prompt }} ### Response: {{ .Response }} </s> """Create the Model with Ollama
Open your terminal and run the following command to create the model:
ollama create hybrid_kubernetes_feature_model -f ModelfileThis command tells Ollama to create a new model named
hybrid_kubernetes_feature_modelusing the configuration specified inModelfile.Run the Model
Start interacting with your model:
ollama run hybrid_kubernetes_feature_modelThis will initiate the model and prompt you for input based on the template provided.
Alternatively, you can provide an instruction directly:
ollama run hybrid_kubernetes_feature_model -p "Create a namespace called 'production'."Example Output:
kubectl create namespace production
Model Details
Purpose
The model assists users by:
- Generating accurate
kubectlcommands based on natural language descriptions. - Providing concise explanations about Kubernetes for general queries.
- Politely requesting additional information if the instruction is incomplete or ambiguous.
Intended Users
- Kubernetes administrators
- DevOps engineers
- Developers working with Kubernetes clusters
Training Process
- Base Model: Unsloth's Llama-3.2-3B-Instruct-bnb-4bit
- Fine-tuning: Leveraged the Unsloth framework and Hugging Face's TRL library for efficient training.
- Training Data: Customized dataset focused on Kubernetes operations and features, including
kubectlcommand usage and general Kubernetes concepts, containing approximately 1,500 entries.
Model Features
1. Command Generation in Bash Format
When the model generates CLI commands, it provides them in bash format, enclosed within code blocks for easy execution and clarity. This allows users to copy and paste the commands directly into their terminal.
2. Handling Ambiguity with Polite Clarifications
If the instruction is incomplete or ambiguous, the model will politely ask for the specific missing information instead of making assumptions. This ensures accuracy and prevents the execution of incorrect commands.
3. Providing Concise Explanations
For general Kubernetes questions, the model offers concise and accurate explanations without unnecessary details, helping users understand concepts quickly.
4. Enhanced Accuracy with 3B Model
The transition to the 3B model has significantly reduced hallucinations that sometimes occurred in the 1B model. The 3B model provides more accurate and reliable responses, improving the overall user experience.
Examples
Example 1: Generating a Command
Instruction:
Create a namespace called 'development'.
Response:
kubectl create namespace development
Example 2: Handling Ambiguity
Instruction:
Show me logs.
Response:
Which pod's logs would you like to retrieve?
Example 3: Providing Explanations
Instruction:
What is a Deployment in Kubernetes?
Response:
A Deployment provides declarative updates for Pods and ReplicaSets, allowing you to manage your applications by defining the desired state and letting Kubernetes handle the rest.
Limitations and Considerations
- Accuracy: While the 3B model improves accuracy, the model may occasionally produce incorrect or suboptimal commands. Always review the output before execution.
- Security: Be cautious when executing generated commands, especially in production environments.
Feedback and Contributions
We welcome any comments or participation to improve the model and dataset. If you encounter issues or have suggestions for improvement:
- GitHub: Unsloth Repository
- Contact: Reach out to the developer, dereklck, for further assistance.
Note: This model provides assistance in generating Kubernetes commands and explanations based on user input. Always verify the generated commands in a safe environment before executing them in a production cluster.
If you have any further requests or need additional adjustments, please let me know!
- Downloads last month
- 11
8-bit
Model tree for dereklck/kubernetes_operator_3b_peft_gguf
Base model
meta-llama/Llama-3.2-3B-Instruct