Run this model with HF Jobs
Run UlukaDev/bitnet-roman-numeral-expert on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/UlukaDev/bitnet-roman-numeral-expert. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/UlukaDev/bitnet-roman-numeral-expert on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use UlukaDev/bitnet-roman-numeral-expert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use UlukaDev/bitnet-roman-numeral-expert with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/bitnet-b1.58-2B-4T-bf16") model = PeftModel.from_pretrained(base_model, "UlukaDev/bitnet-roman-numeral-expert") - Notebooks
- Google Colab
- Kaggle
bitnet-roman-numeral-expert
LoRA adapter for microsoft/bitnet-b1.58-2B-4T-bf16. Specialist for decimal β Roman numeral conversion (1β3999). One routed expert in a ternary Mixture-of-Experts project.
Results (120 held-out, exact-match)
| accuracy | |
|---|---|
| base model | 0.000 |
| + this adapter | 0.242 |
Base cannot perform the conversion at all; the adapter learns it partially. Errors concentrate on subtractive-pair cases (IV, IX, XL, XC, CD, CM) and multi-symbol numbers. This is a genuine capability gain over base, not a trophy-grade expert β shipped as a routing target for the MoE.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "microsoft/bitnet-b1.58-2B-4T-bf16"
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, "UlukaDev/bitnet-roman-numeral-expert") # attach adapter, no merge
tok = AutoTokenizer.from_pretrained("UlukaDev/bitnet-roman-numeral-expert")
msgs = [
{"role":"system","content":"You are a careful calculator. Work step by step, then end with exactly 'The answer is X'."},
{"role":"user","content":"What is the number 1994 in Roman numerals?"},
]
text = tok.apply_chat_template(msgs, add_generation_prompt=True, tokenize=False)
out = model.generate(**tok(text, return_tensors="pt").to(model.device), max_new_tokens=220)
print(tok.decode(out[0], skip_special_tokens=True))
Do not call merge_and_unload() β BitNet re-quantizes to ternary each forward pass, which corrupts a merged LoRA. Always load as a separate adapter.
- Downloads last month
- 2
Model tree for UlukaDev/bitnet-roman-numeral-expert
Base model
microsoft/bitnet-b1.58-2B-4T-bf16