Views
No views yet
tiny1mtiny1m model, this model is NOT compatible with llama2.c.
The custom SentencePiece BPE tokenizer utilized here relies on the byte_fallback mechanism to handle unknown characters. Because llama2.c's simplified native C loader/tokenizer cannot interpret or process byte_fallback routines, text generation will fail or corrupt in that environment. This suite is strictly designed and optimized for llama.cpp (GGUF) and Hugging Face transformers (Python) execution../)llama.cpp and compatible engines. The tokenizer vocabulary and special tokens are fully embedded within each GGUF binary. Every compiled quantization variant available in the root directory is explicitly covered below:| Filename(s) / Wildcard Pattern | Type | Size | Purpose / Validation Target |
|---|---|---|---|
tinybpe1m.F32.gguf | F32 | ~4.0 MB | Baseline Test. Validates GGUF parsing, tensor layout, matrix multiplication, RoPE, and Attention logic without dequantization overhead. |
tinybpe1m.F16.gguftinybpe1m.BF16.gguf | F16BF16 | ~2.0 MB | Half-Precision Test. Validates 16-bit floating point loading, type casting, and inference stability. |
tinybpe1m.Q8_0.gguf | Q8_0 | ~1.1 MB | Quantization Level 1. Validates block-based uniform scaling with 32 elements. |
tinybpe1m.Q4_0.gguftinybpe1m.Q4_1.gguf | Q4_0Q4_1 | ~0.7 MB | Quantization Level 2. Validates classic 4-bit linear quantization and bit-unpacking logic. |
tinybpe1m.Q2_K.gguf | Q2_K | ~0.5 MB | Standard K-Quant (2-bit). Validates 2-bit super-block quantization parsing. |
tinybpe1m.Q3_K_*.gguf↳ tinybpe1m.Q3_K_S.gguf↳ tinybpe1m.Q3_K_M.gguf↳ tinybpe1m.Q3_K_L.gguf | Q3_K | ~0.6 MB | Standard K-Quant (3-bit). Validates Small, Medium, and Large sub-variants of 3-bit multi-block structures. |
tinybpe1m.Q4_K_*.gguf↳ tinybpe1m.Q4_K_S.gguf↳ tinybpe1m.Q4_K_M.gguf | Q4_K | ~0.7 MB | Standard K-Quant (4-bit). Validates Small and Medium sub-variants of modern 4-bit super-block structural parsing. |
tinybpe1m.Q5_K_*.gguf↳ tinybpe1m.Q5_K_S.gguf↳ tinybpe1m.Q5_K_M.gguf | Q5_K | ~0.8 MB | Standard K-Quant (5-bit). Validates Small and Medium sub-variants of 5-bit mixed precision super-blocks. |
tinybpe1m.Q6_K.gguf | Q6_K | ~0.9 MB | Standard K-Quant (6-bit). Validates 6-bit high-fidelity super-block quantization. |
tinybpe1m.IQ3_*.gguf↳ tinybpe1m.IQ3_XXS.gguf↳ tinybpe1m.IQ3_S.gguf | I-Quants | ~0.5 MB | Importance Quants (3-bit). Non-linear 3-bit importance quantization targeting lookup table (codebook) decoding logic. |
tinybpe1m.IQ4_*.gguf↳ tinybpe1m.IQ4_NL.gguf↳ tinybpe1m.IQ4_XS.gguf | I-Quants | ~0.6 MB | Importance Quants (4-bit). Non-linear 4-bit importance quantization variants (Non-Linear and Extra Small). |
tinybpe1m.TQ1_0.gguftinybpe1m.TQ2_0.gguf | Ternary | ~0.4 MB | Experimental. Ternary (-1, 0, 1) state quantization for cutting-edge engine testing. |
./hf/)transformers library:hf/model.safetensors: The raw, unquantized model weights stored securely in Safetensors format.hf/config.json: The architectural configuration file defining hyperparameters (layers, heads, dimensions).hf/generation_config.json: Default parameters optimized for text generation.hf/tokenizer_config.json: Tokenizer behavior layout enabling automatic BOS token injection and padding setup.hf/special_tokens_map.json: Architectural mappings tying token strings to exact internal special token IDs.hf/tokenizer.model: The custom 512-vocab SentencePiece tokenizer model file.1./llama-cli -m tinybpe1m.Q4_K_M.gguf -p "Tom and Jerry are " -n 64 --temp 0.0
2transformers library.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4repo_id = "shibatch/tinybpe1m"
5
6# The library automatically loads from the hf/ subfolder
7tokenizer = AutoTokenizer.from_pretrained(repo_id, subfolder="hf")
8model = AutoModelForCausalLM.from_pretrained(repo_id, subfolder="hf")
9
10prompt = "Tom and Jerry are "
11inputs = tokenizer(prompt, return_tensors="pt")
12
13with torch.no_grad():
14 outputs = model.generate(
15 **inputs,
16 max_new_tokens=64,
17 do_sample=False,
18 pad_token_id=tokenizer.eos_token_id
19 )
20
21print(tokenizer.decode(outputs[0], skip_special_tokens=True))
22lm_head) to keep memory structures consistent with standard Llama 2 definitions. Thanks to the highly optimized 512 vocabulary size, the token embedding and output layers remain extremely lightweight.byte_fallback enabled)hidden_size): 128num_hidden_layers): 4num_heads): 2num_kv_heads): 2intermediate_size): 352max_position_embeddings): 256llama2.c project.