fe-dev-dl/grand-master-hardware-expert
Viewer • Updated • 36.5k • 77 • 1
How to use fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16", dtype="auto")How to use fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16
How to use fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16" \
--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": "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16" \
--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": "fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16 with Docker Model Runner:
docker model run hf.co/fe-dev-dl/Ornith-1.0-9B-Hardware-Expert-fp16
Configuration Parsing Warning:Invalid JSON for config file config.json
Fine-tuned hardware engineering expert — low-level hardware code, driver development, embedded systems, RTL design, and electronics engineering.
| Property | Value |
|---|---|
| Base Model | Ornith-1.0-9B-Heretic-Uncensored |
| Architecture | Qwen3.5ForConditionalGeneration (decoder-only) |
| Parameters | 9B |
| Precision | bfloat16 |
| Context Length | 262144 + our training token 8192 |
| License | Apache 2.0 |
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 ```
Base model
deepreinforce-ai/Ornith-1.0-9B