Downloads · 30 days
42
13% of all-time downloads
PhysiQuanty/Binary-Addition-LLM-POC
Binary-Addition-LLM-POC is a text generation model from PhysiQuanty. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A tiny tokenizer-free / bit-level (base-2) calculator proof of concept.
Downloads · 30 days
42
13% of all-time downloads
All-time downloads
315
Public
Parameters
10.7M
42.6 MB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors42.6 MB · 100%
From the Hugging Face model README
A tiny tokenizer-free / bit-level (base-2) calculator proof of concept.
This repository ships custom modeling_*.py / configuration_*.py, so you must load it with trust_remote_code=True.
The model is trained to read two integers encoded as 10-bit binary inside a structured prompt, and to emit an answer inside a BOR ... EOR block (binary output, variable-length).
0, 1BOS=2, EOS=3BOI=4, EOI=5 (integer input blocks)BOR=6, EOR=7 (integer result block)from transformers import AutoModelForCausalLM
m = AutoModelForCausalLM.from_pretrained(
"PhysiQuanty/Binary-Calculator-LLM-POC",
trust_remote_code=True,
)
m.eval()
This repo is typically used with the companion inference script inference_binary_calculator3.py (manual token-by-token loop, no .generate()), supporting:
--prompt_int "int,int" → builds: BOS t0 t1 BOI <10b int1> EOI BOI <10b int2> EOI--print_int → extracts the first BOR ... EOR block and prints the decoded integerpython3 inference_binary_calculator3.py \
--repo "PhysiQuanty/Binary-Calculator-LLM-POC" \
--prompt_int "20,68" \
--seed -1 \
--stop_on_eos \
--max_new_tokens 64 \
--temperature 0.7 \
--top_k 50 \
--print_int
[Seed] 1011554894
[Device] cuda
[Model] loaded from PhysiQuanty/Binary-Calculator-LLM-POC | vocab_size=8
[Prompt Origin] prompt_int="20,68" (t0,t1=0,0)
[Prompt IDs] len=27 first32=[2, 0, 0, 4, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 5, 4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5]
[Generated RAW IDS]
[6, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 7, 3]
[Generated RAW IDS (as digits)]
600001011000760000000100073
[PrintInt] First BOR..EOR
[PrintInt] pos=27 nbits=11 bits=00001011000 int=88
BOR..EOR block is decoded with variable bit-length.temperature, top_k) can affect stability. For deterministic behavior, you can lower temperature and/or increase constraints.