doggydon007/Ornith-1.0-9B-Hardware-Expert-fp16
4139
Ornith-1.0-9B-Hardware-Expert-fp16
Fine-tuned hardware engineering expert — low-level hardware code, driver development, embedded systems, RTL design, and electronics engineering.
Model Details
Capabilities
- Embedded Systems & Firmware — bare-metal C/C++ (ARM Cortex-M, RISC-V, ESP32, STM32), RTOS (FreeRTOS, Zephyr), bootloaders, linker scripts, startup code, DMA, interrupt controllers
- Device Drivers & Linux Kernel — kernel modules, platform drivers, device tree, I2C/SPI/UART/CAN/USB, GPIO, PWM, ADC, timer drivers
- RTL & FPGA Design — Verilog, SystemVerilog, VHDL, FSMs, pipelines, FIFOs, AXI/AHB/APB, timing constraints
- Circuit & PCB Design — analog/digital analysis, power supply design (buck, boost, LDO, flyback), PCB stackup, BMS, motor control
- Low-Level Programming — assembly (ARM, RISC-V, x86), memory-mapped registers, ISRs, exception handling
- Programming lan — Cuda,Python,Rust,Cpp and etc. This model is able to write or edit production grade low level code for hardware & software engineer
Quick Start
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True,
)
prompt = "### Instruction\nWrite an STM32 SPI driver in C that initializes SPI1 in master mode at 1MHz\n### Response\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
4-Bit Quantization (low-memory GPUs)
from transformers import BitsAndBytesConfig
quant = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4")
model = AutoModelForCausalLM.from_pretrained(
model_name, quantization_config=quant, device_map="auto", trust_remote_code=True
)
Training
Fine-tuned on grand-master-hardware-expert using QLoRA (r=16, alpha=32, q_proj+v_proj) with 4-bit NF4 quantization and 8192 context length.
Why bfloat16?
The original base model is float32 (18.8 GB). This merged version is bfloat16 (7.66 GB) — half the storage, identical inference quality, faster loading. No parameters removed, zero precision loss.
License
Apache 2.0 ```