CoolFace
Modelpublic

rakhasetiawan/flint-granite-survival

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
1likes
Model Card

FLINT

FLINT — Field Language Intelligence - v.03 (LoRA Adapter)

⚠️ Portfolio project. Built as a learning exercise to demonstrate a full CPT + LoRA fine-tuning pipeline. Not intended for production use.

Mission

FLINT was initiated to explore the feasibility of an offline-first AI carrying a survival domain knowledge base — intended for search and rescue personnel, field operators, and anyone working in environments without internet connectivity. The goal is a model that can be deployed on-device and queried without any network dependency, providing survival-critical information when it matters most.

This is the LoRA adapter for FLINT, a survival-domain language model continued pre-trained on Wikipedia corpus. Load this adapter on top of ibm-granite/granite-4.0-micro to use FLINT.


Training Details

ParameterValue
Base modelibm-granite/granite-4.0-micro
MethodContinued Pre-Training (CPT) + LoRA
CorpusWikipedia (survival domain)
LoRA rank (r)8
LoRA alpha16
Target modules (attention)qproj, kproj, vproj, oproj
Target modules (MLP)inputlinear, outputlinear
Max sequence length768
Steps250–300
Batch size1 (grad accum 8)
Learning rate2e-5
Precisionfp16

Model Architecture (Verified)

PeftModelForCausalLM
  └── LoraModel
        └── GraniteMoeHybridForCausalLM
              ├── Attention layers
              │     └── q_proj:        lora.Linear (r=8)
              │     └── k_proj:        lora.Linear (r=8)
              │     └── v_proj:        lora.Linear (r=8)
              │     └── o_proj:        lora.Linear (r=8)
              └── MLP layers
                    └── input_linear:  lora.Linear (r=8)
                    └── output_linear: lora.Linear (r=8)

How to Use

python
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

# Load base model
tokenizer = AutoTokenizer.from_pretrained("ibm-granite/granite-4.0-micro")
model     = AutoModelForCausalLM.from_pretrained(
    "ibm-granite/granite-4.0-micro",
    device_map = "cpu",  # change to "cuda" if GPU available
)

# Load FLINT adapter on top
model = PeftModel.from_pretrained(model, "rakhasetiawan/flint-granite-survival")
model.eval()

# Prompt it like a Wikipedia article opening
prompt = "Wilderness survival techniques include"
inputs = tokenizer(prompt, return_tensors="pt")

outputs = model.generate(
    **inputs,
    max_new_tokens = 200,
    temperature    = 0.7,
    do_sample      = True,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Limitations

  • —CPT only — not instruction-tuned, no conversational ability
  • —Short training run (~250–300 steps), knowledge depth is limited
  • —Prototype quality — outputs may be rough or repetitive
  • —Next step would be SFT on survival-domain Q&A pairs

Training Loss

download_training_loss

Loss dropped from 5.04 → ~3.05 over 250 steps, with the curve stabilizing around step 100. The smooth convergence indicates stable training with no instability or gradient issues.

Prompt Example

text
"what do i do to prepare for a natural disaster? give me a checklist of items
to prepare and steps to take"

Response

what do i do to prepare for a natural disaster? give me a checklist of items to prepare and steps to take.

  1. 1.Assess Your Risks: Before you start preparing, determine which natural disasters are most likely to occur in your area. This could include hurricanes, earthquakes, floods, wildfires, or tornadoes. Knowing your risks will help you understand what preparations and protective measures you need to take.
  1. 1.Create a Disaster Preparedness Plan: Draft a plan that includes communication strategies in case family members are separated, evacuation routes, and safe meeting points. Make sure everyone in your household knows what to do in an emergency.
  1. 1.Build an Emergency Kit: Assemble a kit that includes essentials you might need for at least 72 hours. Here's a checklist of items to include:
ItemSpecification
WaterAt least 1 gallon per person per day (drinking + sanitation)
Food3-day supply of non-perishable items
RadioBattery-powered or hand crank — for news updates
FlashlightWith extra batteries
First Aid KitIncluding any prescription medications
WhistleTo signal for help
Dust MaskTo filter contaminated air
Plastic Sheeting + Duct TapeFor shelter-in-place scenarios
Moist Tissues + Waste BagsFor sanitation
Local MapsIn case GPS and navigation systems are down
Cell Phone + ChargersIncluding a portable backup charger

Eval Notes

MetricResult
Quantified specifics✅ FEMA-accurate (1 gal/day, 72hr window, 3-day supply)
Hallucinated terminology✅ None detected
Format✅ Guide/manual style — appropriate for domain
Actionability✅ High — checklist is directly usable
Practitioner depth⚠️ Moderate — disaster-specific variations not yet covered
Version baselineFirst clean hallucination-free output across all eval prompts
Note: Quantified figures (1 gallon/day, 72-hour window) align with FEMA standard preparedness guidelines — not hallucinated values. Practitioner-level depth (disaster-specific kits, document preservation, post-disaster protocols) is the target for v0.4 with field manual corpus.

FLINT — Field Language Intelligence · Built by [rakhasetiawan](https://huggingface.co/rakhasetiawan)