Views
No views yet
1# Using wget
2wget https://huggingface.co/Renugadevi82/cisco-nx-ai-gguf-f16/resolve/main/cisco-nx-ai-f16.gguf
3
4# Using curl
5curl -L https://huggingface.co/Renugadevi82/cisco-nx-ai-gguf-f16/resolve/main/cisco-nx-ai-f16.gguf -o cisco-nx-ai-f16.gguf
6
7# Using Hugging Face CLI
8huggingface-cli download Renugadevi82/cisco-nx-ai-gguf-f16 cisco-nx-ai-f16.gguf --local-dir .1# Interactive mode
2./main -m cisco-nx-ai-f16.gguf -i -n 256 --color -r "User:" -f prompts/chat-with-cisco.txt
3
4# Single prompt
5./main -m cisco-nx-ai-f16.gguf -p "Configure VLAN 100 with name Management" -n 100
6
7# With specific parameters
8./main -m cisco-nx-ai-f16.gguf \
9 --temp 0.7 \
10 --top-k 40 \
11 --top-p 0.9 \
12 --repeat-penalty 1.1 \
13 -p "Show running configuration for interface GigabitEthernet0/1"1from llama_cpp import Llama
2
3# Load model
4llm = Llama(
5 model_path="cisco-nx-ai-f16.gguf",
6 n_ctx=512,
7 n_threads=4,
8 n_gpu_layers=35 # Adjust based on your GPU memory
9)
10
11# Generate response
12prompt = "Configure OSPF on area 0 with router ID 1.1.1.1"
13response = llm(
14 prompt,
15 max_tokens=100,
16 temperature=0.7,
17 top_p=0.9,
18 echo=True
19)
20
21print(response['choices'][0]['text'])1from langchain.llms import LlamaCpp
2from langchain.prompts import PromptTemplate
3from langchain.chains import LLMChain
4
5# Initialize model
6llm = LlamaCpp(
7 model_path="cisco-nx-ai-f16.gguf",
8 temperature=0.7,
9 max_tokens=100,
10 n_ctx=512
11)
12
13# Create prompt template
14template = """You are a Cisco network configuration assistant.
15
16Task: {task}
17
18Response:"""
19
20prompt = PromptTemplate(template=template, input_variables=["task"])
21chain = LLMChain(prompt=prompt, llm=llm)
22
23# Generate
24result = chain.run("Configure a static route to 10.0.0.0/24 via 192.168.1.1")
25print(result)