Instructions to use orca99/auto-mininet-qwen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use orca99/auto-mininet-qwen with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B") model = PeftModel.from_pretrained(base_model, "orca99/auto-mininet-qwen") - Notebooks
- Google Colab
- Kaggle
Auto Mininet - AI-Powered Mininet Code Generator
Auto Mininet is a fine-tuned code-generation model designed to generate Mininet Python scripts from natural language prompts. It is built for networking education and helps students and instructors quickly create, understand, and experiment with network topologies using Mininet.
This model is part of the ScriptNetEdu / Auto Mininet final year project, which provides a ChatGPT-style web interface for generating Mininet code through a fine-tuned Hugging Face LLM.
Model Details
Model Description
This model is fine-tuned from Qwen/Qwen2.5-Coder-1.5B using PEFT. It is specialized for educational network simulation tasks, especially generating Python-based Mininet scripts from user requirements.
The model can assist with creating network topologies, hosts, switches, links, controllers, and basic Mininet configurations. It is intended to support learning, teaching, and prototyping in computer networking labs.
- Developed by:
- Abdullah
22P-9358- p229358@pwr.nu.edu.pk - Muhammad Abdullah
22P-9371- p229371@pwr.nu.edu.pk - Saim Haider
22P-9244- p229244@pwr.nu.edu.pk
- Abdullah
- Supervised by: Dr. Bilal Khan
- Model type: Code generation language model
- Base model:
Qwen/Qwen2.5-Coder-1.5B - Fine-tuning method: PEFT / LoRA
- Language(s): English prompts, Python code output
- Primary domain: Mininet, software-defined networking, network simulation, education
- License: MIT
- Intended users: Students and instructors
Model Sources
- Base Model: Qwen/Qwen2.5-Coder-1.5B
- Project: ScriptNetEdu / Auto Mininet
- Demo/Application: ChatGPT-style web interface for Mininet code generation
Uses
Direct Use
This model can be used directly to generate Mininet Python scripts from natural language instructions.
Example use cases:
- Generate a simple Mininet topology
- Create hosts, switches, and links
- Generate Python scripts for networking labs
- Assist students in understanding Mininet code structure
- Help instructors prepare lab examples and demonstrations
- Prototype SDN and networking simulation scenarios
Downstream Use
The model can be integrated into educational tools, lab assistants, or web applications. In this project, it is used inside a Next.js application with:
- ChatGPT-style interface
- Hugging Face API integration
- User authentication
- Guest mode
- Chat history
- Admin dashboard
- Code syntax highlighting
Out-of-Scope Use
This model should not be used for:
- Production network configuration without human review
- Security-critical networking decisions
- Malicious network simulation or attack automation
- Generating harmful, exploitative, or unauthorized network code
- Replacing instructor guidance or formal networking education
Bias, Risks, and Limitations
The model may sometimes generate incomplete, incorrect, or non-executable Mininet code. Generated scripts should always be reviewed and tested before use.
Known limitations:
- May produce syntax or logic errors
- May omit imports or required Mininet components
- May generate overly simple topologies for complex prompts
- May not fully understand advanced SDN/controller requirements
- May hallucinate unsupported Mininet APIs
- Output quality depends heavily on prompt clarity
Recommendations
Students and instructors should treat the generated code as an educational starting point, not a guaranteed final solution. Always run, inspect, and modify the generated Mininet scripts as needed.
For best results, prompts should clearly specify:
- Number of hosts
- Number of switches
- Link structure
- Controller type
- Bandwidth, delay, or loss requirements
- Expected topology behavior
How to Get Started with the Model
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model = "Qwen/Qwen2.5-Coder-1.5B"
adapter_model = "YOUR_USERNAME/YOUR_MODEL_ID"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(
base_model,
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_model)
prompt = "Generate a Mininet Python script with 2 switches and 4 hosts."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
top_p=0.9,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 19