Instructions to use ibm-granite/granitelib-core-r1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Granite Library
How to use ibm-granite/granitelib-core-r1.0 with Granite Library:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- PEFT
How to use ibm-granite/granitelib-core-r1.0 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Granite Core Library
The Granite Core Library includes three families of LoRA adapters, each developed for a specific task that enhances the base model's capabilities for explainability, calibration, and constraint verification. We provide adapters for:
- ibm-granite/granite-4.0-micro
- ibm-granite/granite-4.1-3b
- ibm-granite/granite-4.1-8b
- ibm-granite/granite-4.1-30b
We give a brief overview of the functionality of each capability below; details can be found in each individual adapter readme.
Capabilities implemented as LoRA adapters
The three capabilities that have been implemented as LoRA adapters and made available in this HF repository are:
Context Attribution: A LoRA adapter that predicts which sentences in the context (including documents and previous conversation turns) were most important for the base model to generate each sentence in its response. The adapter provides contributive attribution, identifying the context sentences that actually influenced the model's response, and ranks them by importance. This is a post-generation intrinsic designed to explain the base model's behavior. Details can be found in the context-attribution readme.
Requirement Check: A LoRA adapter that judges whether an assistant's generation satisfies a set of user-specified requirements, outputting a binary yes/no assessment. It is designed for evaluating constraint satisfaction in instruction-following scenarios, including formatting, content, structural requirements, and quality assurance pipelines. Details can be found in the requirement-check readme.
Uncertainty: A LoRA adapter that provides calibrated certainty scores for the base model's responses. Given a conversation ending with an assistant response, it calculates a certainty percentage reflecting how confident the model is about its answer. Certainty scores are calibrated such that among answers assigned a score of X%, approximately X% are correct. Details can be found in the uncertainty readme.
Recommended Use
The recommended way to call all adapters is through the Mellea framework. For code snippets demonstrating how to use them please refer to the Mellea adapter examples (note: within Mellea, adapters are referred to as "intrinsics").
Model Signing
All adapter artifacts in this repository are signed to ensure integrity and provenance. Each adapter includes a model.sig signature file in its lora/ directory that covers all artifacts in that directory (adapter_config.json, adapter_model.safetensors, io.yaml).
| Adapter | Signature File Path (example) | Signing Identity |
|---|---|---|
| Context Attribution | context-attribution/granite-4.1-3b/lora/model.sig |
Granite-sign@ibm.com |
| Requirement Check | requirement-check/granite-4.1-3b/lora/model.sig |
Granite-sign@ibm.com |
| Uncertainty | uncertainty/granite-4.1-3b/lora/model.sig |
Granite-sign@ibm.com |
The same pattern applies to all model variants (granite-4.0-micro, granite-4.1-3b, granite-4.1-8b, granite-4.1-30b).
Verifying Model Signatures
To verify the integrity of a downloaded adapter, use the model-signing tool:
# Install the model signing verification tool
pip install model-signing
# Verify all artifacts in an adapter's lora/ directory
model_signing verify sigstore \
--signature <adapter>/<model-variant>/lora/model.sig \
--identity Granite-sign@ibm.com \
--identity_provider https://sigstore.verify.ibm.com/oauth2 \
<adapter>/<model-variant>/lora/
For example, to verify the context-attribution adapter for granite-4.1-3b:
model_signing verify sigstore \
--signature context-attribution/granite-4.1-3b/lora/model.sig \
--identity Granite-sign@ibm.com \
--identity_provider https://sigstore.verify.ibm.com/oauth2 \
context-attribution/granite-4.1-3b/lora/
Each model.sig file contains a signature over all adapter artifacts in the corresponding lora/ directory, signed with the identity Granite-sign@ibm.com. This allows users to confirm that the adapter has not been tampered with after release.
Resources
- Learn about the latest updates with Granite: https://www.ibm.com/granite
- Get started with tutorials, best practices, and prompt engineering advice: https://www.ibm.com/granite/docs/
- Learn about the latest Granite learning resources: https://research.ibm.com/blog/granite-4-1-ai-foundation-models
- Downloads last month
- 13,238
Model tree for ibm-granite/granitelib-core-r1.0
Base model
ibm-granite/granite-4.0-micro