Views
No views yet
kubectl describe outputs, and CrashLoopBackOff scenarios.kubectl apply --dry-run=client -f ...) before applying to production.extensions/v1beta1) or be unaware of very recent Alpha features.privileged: true) if not explicitly instructed otherwise.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# Path to your merged model (no base model needed)
5model_id = "Dogacel/Qwen3-Coder-30B-A3B-Kubernetes-Instruct"
6
7# 1. Load the Full Model
8# Use device_map="auto" to handle the 30B size efficiently
9model = AutoModelForCausalLM.from_pretrained(
10 model_id,
11 torch_dtype=torch.float16,
12 device_map="auto",
13 low_cpu_mem_usage=True
14)
15
16tokenizer = AutoTokenizer.from_pretrained(model_id)
17
18# 2. Run Inference
19messages = [
20 {"role": "system", "content": "You are a Kubernetes expert. Diagnose issues step-by-step, then provide the fixed YAML configuration."},
21 {"role": "user", "content": "My Pod is in Pending state and describing it says 'Insufficient cpu'. How do I fix this?"}
22]
23
24text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
25inputs = tokenizer([text], return_tensors="pt").to(model.device)
26
27outputs = model.generate(**inputs, max_new_tokens=2048)
28print(tokenizer.decode(outputs[0], skip_special_tokens=True))["v_proj", "q_proj", "k_proj", "o_proj"]