Downloads · 30 days
0
dzur658/ping-device-id-LoRA-001-MLX
ping-device-id-LoRA-001-MLX is a text generation model from dzur658. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
This is the LoRA Ping (to be released soon!) uses for identifying devices on a user's network. In order to get around Nmap not correctly identifying/fingerprinting devices this LoRA is employed to work with a non-tech…
Downloads · 30 days
0
Access
Public
Updated Feb 26, 2026
Repo size
39.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors39.9 MB · 100%
From the Hugging Face model README
This is the LoRA Ping (to be released soon!) uses for identifying devices on a user's network. In order to get around Nmap not correctly identifying/fingerprinting devices this LoRA is employed to work with a non-technical user to identify devices. The model will receive scan data from Nmap, and ask clarifying questions (if necessary), and finally output what device the model believes the user has in their home. A full list of possible devices the model was trained on can be found here (coming soon!). This effectively allows for network mapping in the home enviornment without the user manually parsing Nmap results themselves! This LoRA was the best of the prototype run, and trained natively in MLX for 600 iters on the device-identification dataset.
First install MLX.
pip install mlx-lm
Then run the following to interact with the model
from mlx_lm import load, generate
system_prompt = """[SEE SYSTEM PROMPT BELOW]"""
model, tokenizer = load(
"Qwen/Qwen3-1.7B",
adapter_path="dzur658/ping-device-id-LoRA-001-MLX"
)
prompt = """[SEE INPUTS SECTION]"""
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": prompt}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
response = generate(
model,
tokenizer,
prompt=prompt,
verbose=True,
temp=0.0, # Greedy decoding is recommended for logic
max_tokens=512
)
You are an expert network diagnostic assistant helping home users identify devices on their network.
Given Nmap scan data, your goal is to identify the SPECIFIC device model.
CORE PROTOCOL:
1. START with a <think> block to analyze the data.
2. DETERMINE if the device is specific (e.g. \"OnePlus 10 Pro\") or generic (e.g. \"OnePlus Technology\").
3. END with EXACTLY ONE of the following tags:
[OPTION 1: IDENTIFIED]
If you are 90% certain of the specific model:
<device>Exact Model Name</device>
[OPTION 2: AMBIGUOUS]
If you are NOT certain or need user confirmation:
<question>The clarifying question you want to ask the user</question>
CRITICAL RULES:\n- NEVER use <device> and <question> in the same response.
- NEVER output plain text outside of tags.
This is the first message this model should see. It provides some information from Nmap, and in Ping is generated using a Jinja2 template. The first "user" message is hidden from the GUI, but this is how we originally prompt the model to get it to go first (as it appears to the end user in Ping).
You have received the following device from Nmap.
{{ nmap_os_data }}
As this model builds off Qwen/Qwen3-1.7B, it employs the same Chain of Thought (CoT) format as the base model.
However, the CoT is modified by the LoRA to increase the model's intelligence as it relates to identifying consumer devices.
See the associated dataset for more info regarding CoT modifications.
Two more tags are employed by the model, <question> and <device>.
Note: These are not special tokens, the tokenizer remains the same as the base model
The model will give a response wrapped in question tags (<question></question>) when it decides to pose a question to the user for clarification.
Once the model believes it has collected all relevant context it will give it's final guess for the device wrapped in <device> tags (<device></device>).
An example interaction may look like the following, assuming boilerplate prompt and system prompt have been passed correctly.
MODEL:
<think>CoT</think>
<question>Do you own...?</question>
USER:
Yeah, I own a...
MODEL:
<think>CoT</think>
<device>OnePlus 10 Pro</device>
{
"model": "Qwen/Qwen3-1.7B",
"num_layers": 8,
"lora_parameters": {
"rank": 32,
"scale": 64,
"dropout": 0.0,
"keys": [
"self_attn.q_proj",
"self_attn.k_proj",
"self_attn.v_proj",
"self_attn.o_proj",
"mlp.gate_proj",
"mlp.up_proj",
"mlp.down_proj"
]
}
}
(Coming Soon!)
Future work will center using RL (GRPO) to improve the model on identification, and recognizing the benefit of asking questions.
If you use this model please cite me 🙂:
@misc{ping2026,
author = {Alex Dzurec},
title = {Ping Device Identifier LoRA},
year = {2026},
publisher = {Hugging Face},
journal = {Hugging Face Model Hub}
}