Instructions to use electron-rare/mascarade-esp32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use electron-rare/mascarade-esp32 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="electron-rare/mascarade-esp32") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("electron-rare/mascarade-esp32") model = AutoModelForCausalLM.from_pretrained("electron-rare/mascarade-esp32") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use electron-rare/mascarade-esp32 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "electron-rare/mascarade-esp32" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "electron-rare/mascarade-esp32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/electron-rare/mascarade-esp32
- SGLang
How to use electron-rare/mascarade-esp32 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "electron-rare/mascarade-esp32" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "electron-rare/mascarade-esp32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "electron-rare/mascarade-esp32" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "electron-rare/mascarade-esp32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use electron-rare/mascarade-esp32 with Docker Model Runner:
docker model run hf.co/electron-rare/mascarade-esp32
Mascarade ESP32
Fine-tuned TinyLlama-1.1B-Chat model specialized in ESP32 microcontroller development.
Part of the Mascarade ecosystem — an agentic LLM orchestration system with domain-specific fine-tuned models for embedded systems and electronics.
Training details
| Parameter | Value |
|---|---|
| Base model | TinyLlama/TinyLlama-1.1B-Chat-v1.0 |
| Method | LoRA (PEFT) — merged into full weights |
| LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj |
| Epochs | 2 |
| Training steps | 30 |
| Final train loss | 1.3873 |
| Dataset | ShareGPT format, domain-specific ESP32 examples |
| GPU | Quadro P2000 (5 GB VRAM) |
| Framework | Hugging Face Transformers + PEFT |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("electron-rare/mascarade-esp32")
tokenizer = AutoTokenizer.from_pretrained("electron-rare/mascarade-esp32")
messages = [{"role": "user", "content": "How do I configure deep sleep on ESP32-S3?"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Related models
| Model | Domain | Base |
|---|---|---|
| mascarade-iot | IoT general | Qwen2.5-Coder-1.5B |
| mascarade-spice | SPICE circuit simulation | TinyLlama-1.1B |
| mascarade-platformio | PlatformIO development | TinyLlama-1.1B |
Datasets
All training datasets are available under clemsail on Hugging Face.
🇪🇺 EU AI Act transparency
This adapter is provided as a fine-tuned LoRA under the AI Act framework (Regulation EU 2024/1689). Compliance metadata:
| Field | Value |
|---|---|
| Provider | L'Électron Rare (clemsail / electron-rare) |
| Role under AI Act | GPAI provider for this adapter |
| Base model | TinyLlama/TinyLlama-1.1B-Chat-v1.0 — see upstream provenance |
| Adapter type | LoRA / PEFT — adapter weights only; base unchanged |
| Training data origin | L'Électron Rare proprietary technical corpus + curated public docs |
| License | Apache-2.0 (adapter). Upstream base licence applies separately. |
| Intended use | ESP32 / ESP-IDF firmware |
| Out of scope | Healthcare diagnosis, legal advice, autonomous safety-critical decisions, generation of malicious code |
| Risk classification | Limited risk — Article 50 transparency obligations apply |
| Copyright respect | Training data does not include scraped copyrighted material. Opt-out signals (robots.txt, ai.txt) are honoured for web-sourced data. |
| Full provenance | https://github.com/ailiance/ailiance/tree/main/docs/provenance |
| Contact | postmaster@saillant.cc — biased output reports, copyright concerns, etc. |
⚠️ You are using an AI model. Outputs may be inaccurate, biased or fabricated. Do not act on them without independent verification, especially in regulated domains.
- Downloads last month
- 29
Model tree for electron-rare/mascarade-esp32
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0