Update README.md
Browse files
README.md
CHANGED
@@ -22,6 +22,8 @@ language:
|
|
22 |
|
23 |
This Llama-based model was fine-tuned to generate `kubectl` commands based on user descriptions. It was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Hugging Face's TRL library.
|
24 |
|
|
|
|
|
25 |
## Model Details
|
26 |
|
27 |
### Purpose
|
@@ -51,6 +53,8 @@ While the model aims to generate accurate commands, there might be occasional ha
|
|
51 |
- Validate the generated commands before execution.
|
52 |
- Use the model as a guide rather than an absolute source.
|
53 |
|
|
|
|
|
54 |
## Usage
|
55 |
|
56 |
### Prompt Template
|
@@ -73,6 +77,8 @@ You are an AI assistant that generates kubectl commands based on the user's desc
|
|
73 |
- **Temperature:** `0.3` (controls the randomness; lower values make outputs more deterministic)
|
74 |
- **Stop Token:** `</s>` (indicates the end of the assistant's response)
|
75 |
|
|
|
|
|
76 |
### Examples
|
77 |
|
78 |
#### Example 1: Generating a Command
|
@@ -90,6 +96,8 @@ kubectl get pods -n kube-system
|
|
90 |
</s>
|
91 |
```
|
92 |
|
|
|
|
|
93 |
#### Example 2: Handling Ambiguity
|
94 |
|
95 |
**Instruction:**
|
@@ -105,6 +113,8 @@ Could you please specify the name of the deployment you want to restart?
|
|
105 |
</s>
|
106 |
```
|
107 |
|
|
|
|
|
108 |
#### Example 3: Providing Explanations
|
109 |
|
110 |
**Instruction:**
|
@@ -120,6 +130,8 @@ A Kubernetes Service is an abstraction that defines a logical set of Pods and a
|
|
120 |
</s>
|
121 |
```
|
122 |
|
|
|
|
|
123 |
## Deployment with Ollama
|
124 |
|
125 |
### Prerequisites
|
@@ -129,9 +141,9 @@ A Kubernetes Service is an abstraction that defines a logical set of Pods and a
|
|
129 |
|
130 |
### Steps
|
131 |
|
132 |
-
1. **Create the
|
133 |
|
134 |
-
Save the following content as `
|
135 |
|
136 |
```plaintext
|
137 |
FROM kubectl_operator.Q8_0.gguf
|
@@ -153,13 +165,17 @@ A Kubernetes Service is an abstraction that defines a logical set of Pods and a
|
|
153 |
"""
|
154 |
```
|
155 |
|
156 |
-
|
|
|
|
|
157 |
|
158 |
```bash
|
159 |
-
ollama create kubectl_operator -f
|
160 |
```
|
161 |
|
162 |
-
|
|
|
|
|
163 |
|
164 |
Start interacting with your model:
|
165 |
|
@@ -167,10 +183,9 @@ A Kubernetes Service is an abstraction that defines a logical set of Pods and a
|
|
167 |
ollama run kubectl_operator
|
168 |
```
|
169 |
|
170 |
-
|
171 |
|
172 |
-
|
173 |
-
- The `ollama run` command initializes the model and waits for user input based on the prompt template.
|
174 |
|
175 |
## Limitations and Considerations
|
176 |
|
@@ -178,9 +193,13 @@ A Kubernetes Service is an abstraction that defines a logical set of Pods and a
|
|
178 |
- **Hallucinations:** In rare cases, the model might generate irrelevant information. If the response seems off-topic, consider rephrasing your instruction.
|
179 |
- **Security:** Be cautious when executing generated commands, especially in production environments.
|
180 |
|
|
|
|
|
181 |
## Feedback and Contributions
|
182 |
|
183 |
We welcome any comments or participation to improve the model and dataset. If you encounter issues or have suggestions for improvement:
|
184 |
|
185 |
- **GitHub:** [Unsloth Repository](https://github.com/unslothai/unsloth)
|
186 |
- **Contact:** Reach out to the developer, **dereklck**, for further assistance.
|
|
|
|
|
|
22 |
|
23 |
This Llama-based model was fine-tuned to generate `kubectl` commands based on user descriptions. It was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Hugging Face's TRL library.
|
24 |
|
25 |
+
---
|
26 |
+
|
27 |
## Model Details
|
28 |
|
29 |
### Purpose
|
|
|
53 |
- Validate the generated commands before execution.
|
54 |
- Use the model as a guide rather than an absolute source.
|
55 |
|
56 |
+
---
|
57 |
+
|
58 |
## Usage
|
59 |
|
60 |
### Prompt Template
|
|
|
77 |
- **Temperature:** `0.3` (controls the randomness; lower values make outputs more deterministic)
|
78 |
- **Stop Token:** `</s>` (indicates the end of the assistant's response)
|
79 |
|
80 |
+
---
|
81 |
+
|
82 |
### Examples
|
83 |
|
84 |
#### Example 1: Generating a Command
|
|
|
96 |
</s>
|
97 |
```
|
98 |
|
99 |
+
---
|
100 |
+
|
101 |
#### Example 2: Handling Ambiguity
|
102 |
|
103 |
**Instruction:**
|
|
|
113 |
</s>
|
114 |
```
|
115 |
|
116 |
+
---
|
117 |
+
|
118 |
#### Example 3: Providing Explanations
|
119 |
|
120 |
**Instruction:**
|
|
|
130 |
</s>
|
131 |
```
|
132 |
|
133 |
+
---
|
134 |
+
|
135 |
## Deployment with Ollama
|
136 |
|
137 |
### Prerequisites
|
|
|
141 |
|
142 |
### Steps
|
143 |
|
144 |
+
1. **Create the Modelfile**
|
145 |
|
146 |
+
Save the following content as a file named `modelfile`:
|
147 |
|
148 |
```plaintext
|
149 |
FROM kubectl_operator.Q8_0.gguf
|
|
|
165 |
"""
|
166 |
```
|
167 |
|
168 |
+
2. **Create the Model with Ollama**
|
169 |
+
|
170 |
+
Open your terminal and run the following command to create the model:
|
171 |
|
172 |
```bash
|
173 |
+
ollama create kubectl_operator -f modelfile
|
174 |
```
|
175 |
|
176 |
+
This command tells Ollama to create a new model named `kubectl_operator` using the configuration specified in `modelfile`.
|
177 |
+
|
178 |
+
3. **Run the Model**
|
179 |
|
180 |
Start interacting with your model:
|
181 |
|
|
|
183 |
ollama run kubectl_operator
|
184 |
```
|
185 |
|
186 |
+
This will initiate the model and prompt you for input based on the template provided.
|
187 |
|
188 |
+
---
|
|
|
189 |
|
190 |
## Limitations and Considerations
|
191 |
|
|
|
193 |
- **Hallucinations:** In rare cases, the model might generate irrelevant information. If the response seems off-topic, consider rephrasing your instruction.
|
194 |
- **Security:** Be cautious when executing generated commands, especially in production environments.
|
195 |
|
196 |
+
---
|
197 |
+
|
198 |
## Feedback and Contributions
|
199 |
|
200 |
We welcome any comments or participation to improve the model and dataset. If you encounter issues or have suggestions for improvement:
|
201 |
|
202 |
- **GitHub:** [Unsloth Repository](https://github.com/unslothai/unsloth)
|
203 |
- **Contact:** Reach out to the developer, **dereklck**, for further assistance.
|
204 |
+
|
205 |
+
---
|