Text Generation
PEFT
Safetensors
GGUF
granite
uno
speculative-decoding
block-diffusion
lora
oflm
openflowlm
npu2
q4nx
conversational
Instructions to use Cyronius/granite-4.2-3b-uno with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Cyronius/granite-4.2-3b-uno with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ibm-granite/granite-4.2-3b") model = PeftModel.from_pretrained(base_model, "Cyronius/granite-4.2-3b-uno") - Notebooks
- Google Colab
- Kaggle
Download code/training/constants.py from Cyronius/granite-4.2-3b-uno: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/Cyronius/granite-4.2-3b-uno/resolve/main/code/training/constants.py
- Command line
-
hf download hf://Cyronius/granite-4.2-3b-uno/code/training/constants.py
-
curl -L -o constants.py https://huggingface.co/Cyronius/granite-4.2-3b-uno/resolve/main/code/training/constants.py
1.53 kB
| """Revision-pinned defaults for Uno training on Granite 4.2 3B.""" | |
| DEFAULT_MODEL_ID = "ibm-granite/granite-4.2-3b" | |
| DEFAULT_MODEL_REVISION = "e459acceac81e5fe67c07d9cfc72329a332e7eb1" | |
| DEFAULT_DATASET_ID = "open-thoughts/OpenThoughts3-1.2M" | |
| DEFAULT_DATASET_REVISION = "61bcf9d4eb38b30295efc2021227a63cc5bb34c8" | |
| CHAT_DATASET_ID = "allenai/tulu-3-sft-mixture" | |
| CHAT_DATASET_REVISION = "b14afda60f1bbebe55d5d2fa1e4df5042f97f8be" | |
| CHAT_TOKEN_SHARE = 0.2 | |
| # Granite's added/special tokens start here; draft noise is drawn from [1, NOISE_HIGH). | |
| NOISE_HIGH = 100256 | |
| DEFAULT_BLOCK_SIZE = 8 | |
| IGNORE_INDEX = -100 | |
| CUTOFF_LENGTH = 4096 | |
| PREPROCESS_TOKEN_ALIGNMENT = 3 | |
| PREPROCESSED_MAX_LENGTH = 4095 | |
| COLLATED_SEQUENCE_LENGTH = 4096 | |
| DEFAULT_SEED = 20261008 | |
| DEFAULT_GLOBAL_BATCH_SIZE = 128 | |
| # IFM's K2-7B setting (5e-5 at alpha/r 64) diverged on Granite ~12 steps into block size 4. | |
| DEFAULT_LEARNING_RATE = 2.0e-5 | |
| DEFAULT_WARMUP_STEPS = 60 | |
| # Added at step ~1160: B8 loss had flattened at constant LR, so cosine-decay the last ~18%. | |
| DEFAULT_DECAY_STEPS = 300 | |
| DEFAULT_CE_ALPHA = 0.0 | |
| DEFAULT_KL_BETA = 0.0 | |
| DEFAULT_TV_GAMMA = 1.0 | |
| DEFAULT_LORA_RANK = 128 | |
| # Uno Table 15: alpha/r 64 beats 16 at <= 1 epoch, which is all this budget reaches. | |
| DEFAULT_LORA_ALPHA_RATIO = 64 | |
| DEFAULT_LORA_ALPHA = DEFAULT_LORA_RANK * DEFAULT_LORA_ALPHA_RATIO | |
| DEFAULT_LORA_DROPOUT = 0.0 | |
| DEFAULT_HUB_MODEL_ID = "Cyronius/granite-4.2-3b-uno" | |
| SUPPORTED_LORA_MODULES = ( | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj", | |
| ) | |