ForeseeAI Qwen3-4B IoT Control (INT4)

Intelligence Drives Progress

ForeseeAI Logo

Developed by ForeseeAI | Calgary, Canada

License Model Size Docker Website


🌟 Edge-Optimized | 🏢 Enterprise-Ready | 🌱 Green Building AI | 🚀 Production-Tested


📖 About This Model | 关于本模型

English

ForeseeAI Qwen3-4B IoT Control is a state-of-the-art, edge-optimized language model specifically designed for intelligent IoT device control and smart space management. Built on Qwen3-4B-Instruct architecture and quantized to INT4 precision, this model embodies ForeseeAI's commitment to bringing advanced AI capabilities to resource-constrained environments while maintaining exceptional performance.

This model powers ForeseeAI's Space+ Smart Space Management System, enabling natural language control of building automation, energy management, and environmental optimization across commercial and residential properties.

中文

ForeseeAI Qwen3-4B IoT Control 是一款专为智能物联网设备控制和智慧空间管理设计的前沿边缘优化语言模型。基于 Qwen3-4B-Instruct 架构并量化至 INT4 精度,本模型体现了 ForeseeAI 致力于在资源受限环境中提供先进 AI 能力的同时保持卓越性能的承诺。

本模型为 ForeseeAI 的 Space+ 智慧空间管理系统提供动力,实现建筑自动化、能源管理和环境优化的自然语言控制,服务于商业和住宅物业。


🏢 About ForeseeAI | 关于 ForeseeAI

English

ForeseeAI is a pioneering AI and IoT solutions company headquartered in Calgary, Canada, dedicated to creating intelligent, sustainable spaces through cutting-edge technology. Our mission, "Intelligence Drives Progress", reflects our commitment to transforming living and working environments with AI-powered innovation.

Our Vision

We envision a future where every space—from homes to offices, from factories to cities—operates with intelligence, efficiency, and environmental consciousness. Through our flagship Space+ Smart Space Management System, we integrate sensors, networks, and AI algorithms to provide real-time monitoring and intelligent control of:

  • 🏢 Building Equipment: Automated management and predictive maintenance
  • Energy Systems: Optimization for reduced consumption and carbon footprint
  • 💡 Lighting & Climate: Adaptive control for comfort and efficiency
  • 🌡️ Environmental Monitoring: Real-time temperature, humidity, and air quality management
  • 🪟 Smart Automation: Curtains, HVAC, and integrated building systems

Core Values

  • 🔒 Safety: Ensuring secure, reliable operations in all environments
  • 🌱 Energy Efficiency: Pioneering green building technologies for sustainability
  • ☁️ Comfort: Enhancing quality of life through intelligent design
  • 🧠 Intelligence: Leveraging AI to drive continuous innovation

Why Edge AI?

At ForeseeAI, we believe that true intelligence requires real-time responsiveness and data privacy. Our edge AI approach brings processing power directly to IoT devices, enabling:

  • ⚡ Instant Response: Sub-second command execution without cloud latency
  • 🔐 Privacy-First: Sensitive data stays on-device
  • 💰 Cost-Effective: Reduced bandwidth and cloud computing costs
  • 🌐 Offline Capable: Continuous operation without internet dependency

中文

ForeseeAI 是一家总部位于加拿大卡尔加里的先锋 AI 和物联网解决方案公司,致力于通过尖端技术创造智能、可持续的空间。我们的使命"智慧,驱动进步"体现了我们通过 AI 驱动的创新改造生活和工作环境的承诺。

我们的愿景

我们憧憬一个未来,每个空间——从家庭到办公室,从工厂到城市——都以智能、高效和环保意识运行。通过我们的旗舰产品 Space+ 智慧空间管理系统,我们整合传感器、网络和 AI 算法,提供以下方面的实时监控和智能控制:

  • 🏢 建筑设备:自动化管理和预测性维护
  • 能源系统:优化以降低消耗和碳足迹
  • 💡 照明与气候:自适应控制以实现舒适和效率
  • 🌡️ 环境监测:实时温度、湿度和空气质量管理
  • 🪟 智能自动化:窗帘、暖通空调和集成建筑系统

核心价值观

  • 🔒 安全:确保所有环境中的安全可靠运行
  • 🌱 能源效率:开创绿色建筑技术以实现可持续发展
  • ☁️ 舒适:通过智能设计提升生活质量
  • 🧠 智能:利用 AI 驱动持续创新

为什么选择边缘 AI?

在 ForeseeAI,我们相信真正的智能需要实时响应性和数据隐私。我们的边缘 AI 方法将处理能力直接带到物联网设备,实现:

  • ⚡ 即时响应:无需云延迟的亚秒级命令执行
  • 🔐 隐私优先:敏感数据保留在设备上
  • 💰 成本效益:降低带宽和云计算成本
  • 🌐 离线能力:无需互联网依赖的持续运行

🎯 Model Philosophy | 模型理念

English

This model represents ForeseeAI's commitment to democratizing AI for IoT applications. We believe that intelligent device control should be:

  1. 🗣️ Natural: Understanding human language, not cryptic commands
  2. ⚡ Fast: Edge-optimized for real-time response
  3. 🌍 Accessible: Deployable on resource-constrained hardware
  4. 🔓 Open: Built on open-source foundations with Apache-2.0 licensing
  5. 🎯 Practical: Focused on real-world applications, not just benchmarks

By fine-tuning Qwen3-4B with LoRA adapters and applying INT4 quantization, we've created a model that:

  • Runs efficiently on edge devices with limited compute
  • Maintains 91% of full-precision performance
  • Generates structured, reliable IoT commands
  • Supports bilingual operation (Chinese & English)
  • Fits in 2.5GB, enabling widespread deployment

中文

本模型代表了 ForeseeAI 致力于使 IoT 应用的 AI 民主化的承诺。我们认为智能设备控制应该是:

  1. 🗣️ 自然:理解人类语言,而非晦涩命令
  2. ⚡ 快速:边缘优化以实现实时响应
  3. 🌍 可访问:可部署在资源受限的硬件上
  4. 🔓 开放:基于开源基础,采用 Apache-2.0 许可
  5. 🎯 实用:专注于实际应用,而非仅仅基准测试

通过使用 LoRA 适配器微调 Qwen3-4B 并应用 INT4 量化,我们创建了一个模型,它:

  • 在计算能力有限的边缘设备上高效运行
  • 保持全精度性能的 91%
  • 生成结构化、可靠的物联网命令
  • 支持双语操作(中文和英文)
  • 仅需 2.5GB,实现广泛部署

🚀 Key Features | 核心特性

Feature English 中文
🗜️ Model Size 2.5GB INT4 quantized 2.5GB INT4 量化
⚡ Latency 1.2s average response time 平均响应时间 1.2 秒
🎯 Accuracy 100% JSON parsing success JSON 解析成功率 100%
🌐 Languages Chinese & English 中文和英文
📱 Edge Ready 4GB VRAM minimum 最低 4GB 显存
🔧 Output Format MCP IoT JSON standard MCP IoT JSON 标准
📜 License Apache-2.0 (Commercial-friendly) Apache-2.0(商用友好)

💼 Real-World Applications | 实际应用

English

This model powers intelligent control across ForeseeAI's deployed systems:

🏢 Commercial Buildings

  • Energy Management: "Optimize HVAC for maximum efficiency during off-peak hours"
  • Smart Lighting: "Dim conference room lights to 60% and adjust color temperature for presentations"
  • Access Control: "Unlock main entrance for delivery personnel from 9-11 AM"

🏠 Residential Spaces

  • Home Automation: "Close all curtains and turn on evening lighting"
  • Climate Control: "Set bedroom temperature to 22°C before I arrive home"
  • Security: "Activate night mode security system at 10 PM"

🏭 Industrial IoT

  • Equipment Monitoring: "Alert if warehouse temperature exceeds 28°C"
  • Predictive Maintenance: "Schedule maintenance for HVAC unit showing abnormal vibration"
  • Energy Optimization: "Switch to solar power when grid rates exceed threshold"

中文

本模型为 ForeseeAI 部署系统中的智能控制提供动力:

🏢 商业建筑

  • 能源管理:"在非高峰时段优化暖通空调以实现最大效率"
  • 智能照明:"将会议室灯光调暗至 60% 并调整色温以适应演示"
  • 门禁控制:"在上午 9-11 点为配送人员解锁主入口"

🏠 住宅空间

  • 家居自动化:"关闭所有窗帘并开启晚间照明"
  • 气候控制:"在我到家前将卧室温度设置为 22°C"
  • 安全:"在晚上 10 点激活夜间安全系统"

🏭 工业物联网

  • 设备监控:"如果仓库温度超过 28°C 则发出警报"
  • 预测性维护:"为显示异常振动的暖通空调设备安排维护"
  • 能源优化:"当电网费率超过阈值时切换到太阳能"

📊 Technical Specifications | 技术规格

Model Architecture | 模型架构

Base Model:    Qwen/Qwen2.5-3B-Instruct (4.02B parameters)
Fine-tuning:   LoRA (rank=64, alpha=128)
Quantization:  INT4 (bitsandbytes)
Training Data: 5000+ IoT control examples (Chinese/English)
Output Format: MCP IoT JSON Schema

Performance Metrics | 性能指标

Metric INT4 (This Model) FP16 Baseline Improvement
Model Size 2.5GB 7.5GB 67% smaller 🎯
Latency 1,226 ms 1,120 ms 9% slower (acceptable)
Accuracy 100% 100% Maintained
VRAM Usage ~4GB ~8GB 50% reduction 💰
Deployment Cost Low High 3x cheaper 📉

Hardware Requirements | 硬件要求

Minimum | 最低配置:

  • GPU: NVIDIA with 4GB VRAM | NVIDIA 显卡 4GB 显存
  • RAM: 8GB | 内存 8GB
  • Storage: 5GB | 存储空间 5GB

Recommended | 推荐配置:

  • GPU: NVIDIA with 6GB+ VRAM | NVIDIA 显卡 6GB+ 显存
  • RAM: 16GB | 内存 16GB
  • Storage: 10GB | 存储空间 10GB

Edge Devices | 边缘设备:

  • NVIDIA Jetson Orin Nano (8GB) ✅
  • NVIDIA Jetson AGX Xavier ✅
  • Industrial PCs with NVIDIA GPU ✅

🔧 Quick Start | 快速开始

Installation | 安装

pip install transformers bitsandbytes accelerate torch

Basic Usage | 基本使用

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Load model | 加载模型
model_name = "ForeseeLab/foreseeai-qwen3-4b-iot-int4"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    device_map="auto",
    trust_remote_code=True
)

# System prompt for IoT control | IoT 控制的系统提示
system_prompt = """You are an IoT device control assistant developed by ForeseeAI.
Users will describe their device control needs in natural language, and you need to
understand their intent and generate corresponding device control commands.

Output format is JSON with the following fields:
- device_id: Device identifier
- action: Operation type
- parameters: Operation parameters (optional)

Example:
User: Turn on the living room light
Output: {"device_id": "light_living_room", "action": "turn_on", "parameters": {}}

你是由 ForeseeAI 开发的物联网设备控制助手。用户会用自然语言描述他们的设备控制需求,
你需要理解用户意图并生成对应的设备控制指令。"""

# User input | 用户输入
user_input = "Set the air conditioner to 25 degrees | 把空调温度调到25度"

# Generate response | 生成响应
messages = [
    {"role": "system", "content": system_prompt},
    {"role": "user", "content": user_input}
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
inputs = tokenizer([text], return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=128,
        temperature=0.1,
        do_sample=True,
        top_p=0.9
    )

response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
# Output: {"device_id": "ac_living_room", "action": "set_temperature", "parameters": {"temperature": 25}}

More Examples | 更多示例

Smart Lighting Control | 智能照明控制
# English
user_input = "Dim the bedroom lights to 30%"
# Output: {"device_id": "light_bedroom", "action": "set_brightness", "parameters": {"brightness": 30}}

# Chinese | 中文
user_input = "把卧室的灯调暗到30%"
# Output: {"device_id": "light_bedroom", "action": "set_brightness", "parameters": {"brightness": 30}}
Climate Control | 气候控制
# English
user_input = "Switch AC to cooling mode and set to 23 degrees"
# Output: {"device_id": "ac_main", "action": "set_mode", "parameters": {"mode": "cooling", "temperature": 23}}

# Chinese | 中文
user_input = "将空调切换到制冷模式并设置为23度"
# Output: {"device_id": "ac_main", "action": "set_mode", "parameters": {"mode": "cooling", "temperature": 23}}
Smart Curtains | 智能窗帘
# English
user_input = "Close all curtains in the office"
# Output: {"device_id": "curtain_office_all", "action": "close", "parameters": {}}

# Chinese | 中文
user_input = "关闭办公室所有窗帘"
# Output: {"device_id": "curtain_office_all", "action": "close", "parameters": {}}

🐳 Docker Deployment | Docker 部署

Production-Ready Container | 生产就绪容器

ForeseeAI provides a complete Docker image with vLLM inference engine:

ForeseeAI 提供带有 vLLM 推理引擎的完整 Docker 镜像:

# Pull image | 拉取镜像
docker pull epochcentral/foreseeai-ellm-int4:1.0.0

# Run service | 运行服务
docker run -d --name foreseeai-iot \
    --gpus all \
    -p 8000:8000 \
    epochcentral/foreseeai-ellm-int4:1.0.0

API Usage | API 使用

OpenAI-compatible API for seamless integration:

兼容 OpenAI 的 API,无缝集成:

curl -X POST http://localhost:8000/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "/model",
        "messages": [
            {"role": "system", "content": "You are an IoT assistant by ForeseeAI"},
            {"role": "user", "content": "Turn on the living room light"}
        ],
        "temperature": 0,
        "max_tokens": 100
    }'

Response:

{
  "choices": [{
    "message": {
      "role": "assistant",
      "content": "{\"device_id\": \"light_living_room\", \"action\": \"turn_on\", \"parameters\": {}}"
    }
  }]
}

📈 Training Details | 训练细节

Dataset | 数据集

  • Size: 5,000+ examples | 5,000+ 样本
  • Languages: Chinese & English | 中文和英文
  • Domains: Smart home, commercial buildings, industrial IoT
  • Format: Natural language → MCP IoT JSON
  • Quality: Manually curated and validated | 人工策划和验证

Training Configuration | 训练配置

Base Model: Qwen/Qwen2.5-3B-Instruct
Method: LoRA Fine-tuning
LoRA Rank: 64
LoRA Alpha: 128
Target Modules: [q_proj, k_proj, v_proj, o_proj]
Quantization: INT4 (post-training, bitsandbytes)
Learning Rate: 5e-5
Batch Size: 4 (with gradient accumulation: 4)
Max Length: 2048 tokens
Epochs: 3
Optimizer: AdamW
Hardware: NVIDIA GPU (CUDA 12.1)
Training Time: ~2 hours

Model Selection Rationale | 模型选择理由

Why Qwen3-4B?

  1. Optimal Size: Perfect balance between capability and efficiency
  2. Multilingual: Native Chinese support with strong English performance
  3. License: Commercial-friendly (Apache-2.0)
  4. Architecture: Modern transformer design with efficiency optimizations
  5. Community: Active development and strong ecosystem

为什么选择 Qwen3-4B?

  1. 最佳大小:能力和效率之间的完美平衡
  2. 多语言:原生中文支持,英语性能强劲
  3. 许可:商业友好(Apache-2.0)
  4. 架构:现代 Transformer 设计,具有效率优化
  5. 社区:积极开发和强大的生态系统

⚖️ License & Usage | 许可与使用

Apache-2.0 License

This model is released under Apache-2.0, allowing:

  • Commercial Use: Deploy in commercial products and services
  • Modification: Adapt and fine-tune for your needs
  • Distribution: Share and distribute freely
  • Patent Use: Licensed patent rights included
  • Private Use: Use internally without disclosure

本模型采用 Apache-2.0 许可发布,允许:

  • 商业使用:部署在商业产品和服务中
  • 修改:根据您的需求进行调整和微调
  • 分发:自由分享和分发
  • 专利使用:包含许可的专利权
  • 私人使用:内部使用无需披露

Attribution | 署名

When using this model, please include:

使用本模型时,请包含:

Powered by ForeseeAI Qwen3-4B IoT Control
Developed by ForeseeAI | https://www.foreseeai.ca/

⚠️ Limitations & Considerations | 限制与注意事项

English

Domain Specificity: This model is optimized for IoT device control and may not perform well on general-purpose tasks. For general conversation or other NLP tasks, consider using the base Qwen3-4B-Instruct model.

Language Support: While the model supports both Chinese and English, it was primarily trained on Chinese IoT commands with secondary English support. Performance may vary across languages.

Quantization Trade-offs: INT4 quantization reduces model size by 67% but may introduce minor accuracy differences compared to FP16. For maximum accuracy in critical applications, consider using the FP16 version (available on request).

Hardware Requirements: GPU with CUDA support is strongly recommended for optimal performance. CPU inference is possible but significantly slower (10-20x).

Safety & Reliability: While extensively tested, this model should be deployed with appropriate safety measures for critical infrastructure. Always implement fail-safes and human oversight for mission-critical systems.

中文

领域特定性:本模型针对物联网设备控制进行优化,可能在通用任务上表现不佳。对于一般对话或其他 NLP 任务,请考虑使用基础 Qwen3-4B-Instruct 模型。

语言支持:虽然模型支持中文和英文,但主要在中文物联网命令上训练,英文为次要支持。不同语言的性能可能有所不同。

量化权衡:INT4 量化将模型大小减少 67%,但与 FP16 相比可能引入轻微的精度差异。对于关键应用中的最大精度,请考虑使用 FP16 版本(应要求提供)。

硬件要求:强烈建议使用支持 CUDA 的 GPU 以获得最佳性能。CPU 推理是可能的,但速度要慢得多(10-20 倍)。

安全与可靠性:虽然经过广泛测试,但本模型应在关键基础设施中部署时采取适当的安全措施。对于关键任务系统,始终实施故障安全措施和人工监督。


🤝 Support & Contact | 支持与联系

ForeseeAI Company | ForeseeAI 公司

Headquarters | 总部: Calgary, Alberta, Canada

R&D Center | 研发中心: Calgary, Canada

Website | 网站: https://www.foreseeai.ca/

Business Contact | 商务联系:

Model Maintainer | 模型维护者:

Community & Resources | 社区与资源

Enterprise Solutions | 企业解决方案

Interested in deploying this model at scale or customizing for your specific needs?

对于大规模部署或针对您的特定需求进行定制感兴趣?

We offer | 我们提供:

  • 🏢 Custom model training for your IoT ecosystem
  • 🔧 Integration support for Space+ Smart Space Management System
  • 📊 Enterprise licensing and SLA agreements
  • 🎓 Training and consultation services
  • 🌍 Global deployment support

Contact us | 联系我们: [email protected]


📝 Citation | 引用

If you use this model in your research or application, please cite:

如果您在研究或应用中使用本模型,请引用:

@misc{foreseeai2025qwen3iot,
  title={ForeseeAI Qwen3-4B IoT Control: Edge-Optimized Language Model for Smart Space Management},
  author={ForeseeAI Research Team},
  year={2025},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/ForeseeLab/foreseeai-qwen3-4b-iot-int4}},
  note={Developed by ForeseeAI, Calgary, Canada}
}

🙏 Acknowledgments | 致谢

English

We extend our gratitude to:

  • Alibaba Qwen Team: For developing the excellent Qwen3-4B-Instruct base model
  • vLLM Project: For the high-performance inference engine
  • Hugging Face: For providing the platform and ecosystem
  • bitsandbytes: For efficient quantization capabilities
  • Open Source Community: For making advanced AI accessible to all

Special thanks to our ForeseeAI engineering team in Calgary for their dedication to bringing intelligence to every space.

中文

我们对以下方面表示感谢:

  • 阿里巴巴 Qwen 团队:开发出色的 Qwen3-4B-Instruct 基础模型
  • vLLM 项目:提供高性能推理引擎
  • Hugging Face:提供平台和生态系统
  • bitsandbytes:提供高效量化能力
  • 开源社区:使先进的 AI 对所有人开放

特别感谢我们在卡尔加里的 ForeseeAI 工程团队,感谢他们致力于为每个空间带来智能。


Intelligence Drives Progress | 智慧,驱动进步

Developed with ❤️ by ForeseeAI | Calgary, Canada

Website LinkedIn Email


🌱 Building Intelligent, Sustainable Spaces for a Better Tomorrow

🏢 Trusted by Smart Buildings Across North America

🚀 Powering the Future of IoT with Edge AI

Downloads last month
3
Safetensors
Model size
4B params
Tensor type
F32
·
F16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ForeseeLab/foreseeai-qwen3-4b-iot-int4

Base model

Qwen/Qwen2.5-3B
Quantized
(157)
this model

Evaluation results