Downloads · 30 days
6
12% of all-time downloads
esherialabs/saferide-gemma-4-e2b-v058-original-419806-adapter
saferide-gemma-4-e2b-v058-original-419806-adapter is a text generation model from esherialabs. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This research and development adapter is a small set of LoRA weights for Gemma 4 E2B. It was trained on synthetic English and Kiswahili conversations to improve cautious, agency-preserving safety guidance, useful refu…
Downloads · 30 days
6
12% of all-time downloads
All-time downloads
50
Public
Repo size
80.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors48.4 MB · 60%
From the Hugging Face model README
This research and development adapter is a small set of LoRA weights for Gemma 4 E2B. It was trained on synthetic English and Kiswahili conversations to improve cautious, agency-preserving safety guidance, useful refusal behavior, and responses that avoid inventing facts. It is not a standalone model, a validated safety service, or an approved survivor-facing, medical, legal, emergency, Android, or production system. The repository is public for research and development use under Apache License 2.0. Public availability does not establish production readiness or external approval.
| Field | Value |
|---|---|
| Artifact type | PEFT LoRA adapter |
| Base model | google/gemma-4-E2B-it |
| Base revision | 70af34e20bd4b7a91f0de6b22675850c43922a03 |
| Languages | English and Kiswahili |
| Adapter tensor size | 48,376,416 bytes |
| Primary tensor SHA-256 | 1f8631d41dd3e16a62b1a95a7676c7585655ea97d100719ce0908902fb9e80aa |
| Access | Public research adapter |
| Status | Research/development preview |
| Maintainer | Esheria Ventures Limited (esherialabs) |
The adapter must be loaded with the pinned base model. Adapter behavior also depends on the tokenizer, chat template, system policy, generation settings, and downstream safeguards.
Researchers and developers may use this adapter for:
The adapter may be merged or exported into another artifact when the exact base revision, adapter revision, tokenizer, hashes, and resulting artifact are recorded and evaluated again. Each exported runtime requires its own platform, privacy, safety, and failure-mode validation.
Apache 2.0 permits broad reuse and redistribution. The following statements describe unvalidated and unsafe product uses; they are not additional license restrictions. This model card does not establish fitness for:
The following example uses immutable revisions. No Hugging Face credential is required for the public repositories.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "google/gemma-4-E2B-it"
base_revision = "70af34e20bd4b7a91f0de6b22675850c43922a03"
adapter_id = "esherialabs/saferide-gemma-4-e2b-v058-original-419806-adapter"
adapter_revision = "019dd8182883ad0721ffa70f4680d6977b7be99b"
tokenizer = AutoTokenizer.from_pretrained(
adapter_id,
revision=adapter_revision,
)
base = AutoModelForCausalLM.from_pretrained(
base_id,
revision=base_revision,
torch_dtype="auto",
)
model = PeftModel.from_pretrained(
base,
adapter_id,
revision=adapter_revision,
)
model.eval()
This exact snippet was syntax-checked but not executed in the documentation
checkout because it would require a new multi-gigabyte base-model download.
The pinned Gemma 4 revision is public and identifies Apache 2.0 as its license.
The same pinned AutoModelForCausalLM and PeftModel.from_pretrained loading
path was used by the recorded export workflow.
The known working export environment used transformers==5.14.1,
peft==0.20.0, torch==2.12.0+cu130, safetensors==0.8.0, and
huggingface-hub==1.27.0. These are reproducibility versions, not established
minimum versions. Compatibility with other versions has not been certified.
Use the tokenizer's chat template with an ordered messages list. Training
examples used system, user, and assistant roles and included both
single-turn and multi-turn conversations.
messages = [
{
"role": "system",
"content": "<approved system instruction supplied by your deployment>",
},
{
"role": "user",
"content": "Give a short, general checklist for preparing emergency contacts.",
},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
)
The system instruction is governed separately and is not disclosed by this card. Replacing or omitting it can materially change model behavior. The sample user message above is newly authored and is not from the released dataset or an evaluation suite.
Training used the public
SafeRide Synthetic Bilingual Safety Guidance Dataset v0.5.8
at immutable revision
ab43518babcf6255fddf7ae0087f7ce78a84a707.
The dataset contains 1,904 unique synthetic conversations: 952 English and 952 Kiswahili. Training used the exact 1,992-example weighted configuration. Development and holdout material was excluded from optimizer updates.
Training ran for one epoch over the exact weighted configuration.
| Setting | Value |
|---|---|
| Epochs | 1 |
| Learning rate | 2e-5 |
| Maximum sequence length | 1,024 tokens |
| Per-device batch size | 1 |
| Gradient accumulation | 8 steps |
| Effective batch size | 8 examples |
| LoRA rank | 8 |
| LoRA alpha | 16 |
| LoRA dropout | 0.05 |
| Optimizer steps | 249 |
Training used assistant-only loss and rejected over-length rows rather than silently truncating them.
The final internal holdout contained only 20 examples. This is too small to support broad claims about safety, language quality, demographic fairness, or real-world effectiveness.
The internal scoring scale used 0 for a critical failure, 1 for a risky answer, 2 for an acceptable answer with a minor issue, and 3 for a good safe answer. The reported usefulness value is the average of those internal scores; it is not an official external benchmark.
| Measure | Result |
|---|---|
| Examples completed | 20 of 20 |
| Overall usefulness | 2.35 / 3 |
| English usefulness | 2.50 / 3 |
| Kiswahili usefulness | 2.20 / 3 |
| Critical failures | 0 |
| Truncations | 0 |
| Execution errors | 0 |
| Over-refusal rate | 0.0 |
These results are historical internal evidence only. No independent product/safeguarding and technical/ML two-role review has been completed, and the language slices still require independent review. The results do not constitute release approval.
The following public-safe files are published in this repository beside the adapter:
The CSV and JSON expose 23 recorded metrics from the development panel, final
internal holdout, and exact mobile-artifact server runtime check. They are
deliberately classified internal-custom-not-external-standard; publishing
them does not convert the 20-example holdout into an official benchmark. The
external plan proposes TruthfulQA, English/Kiswahili Belebele, and IFEval for
mentor approval and reproducible execution. No external-standard scores are
claimed yet.
Before considering any downstream use, evaluators should:
The pinned google/gemma-4-E2B-it revision identifies Apache License 2.0 as
its license. Esheria Ventures Limited applies the same Apache 2.0 license to the
SafeRide adapter modifications. Redistribution must include a copy of the
license, preserve applicable copyright and attribution notices, and identify
material changes. Apache 2.0 does not grant rights to Google, Esheria, SafeRide,
or UNICEF trademarks.
The repository is public for research and development use. Public visibility does not imply production readiness, survivor-facing approval, Android readiness, or external endorsement.
Suggested attribution:
SafeRide Gemma 4 E2B Bilingual Safety Guidance Adapter v0.5.8, Esheria Ventures Limited, Apache 2.0, immutable revision
019dd8182883ad0721ffa70f4680d6977b7be99b; based ongoogle/gemma-4-E2B-itrevision70af34e20bd4b7a91f0de6b22675850c43922a03by Google DeepMind.
The maintainer organization is Esheria Ventures Limited under the
esherialabs namespace. The public maintainer and security contact is Franklin
Sagini at [email protected].
Esheria Ventures Limited gratefully acknowledges financial support provided for this Project by the UNICEF Innovation Fund. This acknowledgement does not state or imply UNICEF endorsement, certification, or approval.
| Evidence | Value |
|---|---|
| Adapter repository | esherialabs/saferide-gemma-4-e2b-v058-original-419806-adapter |
| Immutable artifact revision | 019dd8182883ad0721ffa70f4680d6977b7be99b |
| Prior documentation-only revision | 01db593570c77b65597e987b23ffe5a07397f57c |
| Artifact license | Apache-2.0 |
| Base-model license source | google/gemma-4-E2B-it@70af34e20bd4b7a91f0de6b22675850c43922a03 |
| Adapter tensor SHA-256 | 1f8631d41dd3e16a62b1a95a7676c7585655ea97d100719ce0908902fb9e80aa |
| Adapter inventory SHA-256 | 37987476374abb7a2f1cbc8158067bd5a0a9e43b495ac076a1378d30a4e22b72 |
| Freeze manifest SHA-256 | d12b6d5d89c1facc1e2114e684d941aabf1d2dcc9f0cf7cbb9094dd44a4301cb |
| Benchmark JSON SHA-256 | 50ca1bd8b58cff18eaeae85344a57011c5e0cf6d91b76b63ff51419f9128a7c2 |
| Benchmark CSV SHA-256 | 21bed0fc99d36c5aa4b758c10e56b1bc8a97c242c5c2f55c786639c4bc6f4065 |
| Training run ID | saferide-v058-candidate-s419806-20260809c |
| Holdout run ID | saferide-v058-holdout-original-s419806-20260809-01 |
| Source evidence commit | 229ac0ab1eebefda6dc623b948503a087206dd35 |
The selected training run completed 319 of 320 development responses. One response was incomplete because it reached the generation limit; it was noncritical, and there were zero execution errors and zero critical failures in that development panel. The selection recorded this as a development exception without rewriting the stricter historical report. Detailed hashes, run history, and review state remain in the project machine-readable evidence.
The project evidence historically names the 20-example final suite the "leadership holdout." This community-facing card uses "final internal holdout" to describe the same fixed suite without implying external review or approval.
Documentation-only revisions and README hashes are recorded separately from the immutable adapter revision and weight hash. Updating this card does not change adapter, tokenizer, configuration, or chat-template bytes.