Instructions to use nehmeailabs-org/nehme-flashcheck-270m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use nehmeailabs-org/nehme-flashcheck-270m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="nehmeailabs-org/nehme-flashcheck-270m", filename="nehme-flashcheck-270m.Q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use nehmeailabs-org/nehme-flashcheck-270m with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0 # Run inference directly in the terminal: llama-cli -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0 # Run inference directly in the terminal: llama-cli -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf nehmeailabs-org/nehme-flashcheck-270m:Q8_0
Use Docker
docker model run hf.co/nehmeailabs-org/nehme-flashcheck-270m:Q8_0
- LM Studio
- Jan
- vLLM
How to use nehmeailabs-org/nehme-flashcheck-270m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nehmeailabs-org/nehme-flashcheck-270m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nehmeailabs-org/nehme-flashcheck-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nehmeailabs-org/nehme-flashcheck-270m:Q8_0
- Ollama
How to use nehmeailabs-org/nehme-flashcheck-270m with Ollama:
ollama run hf.co/nehmeailabs-org/nehme-flashcheck-270m:Q8_0
- Unsloth Studio
How to use nehmeailabs-org/nehme-flashcheck-270m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nehmeailabs-org/nehme-flashcheck-270m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nehmeailabs-org/nehme-flashcheck-270m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nehmeailabs-org/nehme-flashcheck-270m to start chatting
- Docker Model Runner
How to use nehmeailabs-org/nehme-flashcheck-270m with Docker Model Runner:
docker model run hf.co/nehmeailabs-org/nehme-flashcheck-270m:Q8_0
- Lemonade
How to use nehmeailabs-org/nehme-flashcheck-270m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nehmeailabs-org/nehme-flashcheck-270m:Q8_0
Run and chat with the model
lemonade run user.nehme-flashcheck-270m-Q8_0
List all available models
lemonade list
FlashCheck-270M: The Edge Logic Engine
Model Description
FlashCheck-270M is a specialized Small Language Model (SLM) fine-tuned for Contextual Policy Adherence and Hallucination Detection.
Built on the Gemma 3 270M instruction-tuned family, FlashCheck is designed to act as a lightweight, privacy-preserving guardrail in RAG (Retrieval-Augmented Generation) pipelines.
- Developer: Nehme AI Labs
- Base Model:
google/gemma-3-270m-it - License/Terms: Gemma (see Gemma terms associated with the base model)
What’s in this repo
- Transformers (standalone):
config.json+model.safetensors+ tokenizer files - GGUF (local inference):
nehme-flashcheck-270m.Q8_0.gguf
Intended behavior
Given a Document (premise) and a Claim (hypothesis), the model answers:
"Yes"if the claim is fully supported by the document"No"otherwise
Usage
1) Python (Transformers)
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_ID = "nehmeailabs-org/nehme-flashcheck-270m"
SYSTEM_MESSAGE = (
"You are a fact checking model developed by NehmeAILabs. Determine whether the provided claim is consistent with "
"the corresponding document. Consistency in this context implies that all information presented in the claim is "
"substantiated by the document. If not, it should be considered inconsistent. Please assess the claim's consistency "
"with the document by responding with either \"Yes\" or \"No\"."
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
device_map="auto",
torch_dtype="auto",
)
model.eval()
document = "The user must not share API keys."
claim = "The user message 'Here is the staging key sk-123' violates the policy."
user_prompt = f"Document: {document}\n\nClaim: {claim}"
messages = [
{"role": "system", "content": SYSTEM_MESSAGE},
{"role": "user", "content": user_prompt},
]
# Prefer the model's chat template if available
try:
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
)
except Exception:
plain = f"{SYSTEM_MESSAGE}\n\n{user_prompt}"
input_ids = tokenizer(plain, return_tensors="pt").input_ids
input_ids = input_ids.to(model.device)
with torch.no_grad():
out = model.generate(
input_ids=input_ids,
max_new_tokens=8,
do_sample=False,
temperature=0.0,
top_p=1.0,
)
gen_ids = out[0, input_ids.shape[-1]:]
verdict = tokenizer.decode(gen_ids, skip_special_tokens=True).strip()
print(verdict) # Expected: "Yes" or "No"
2) Local (GGUF / llama.cpp)
This repo includes nehme-flashcheck-270m.Q8_0.gguf for use with llama.cpp and compatible runtimes.
./main -m nehme-flashcheck-270m.Q8_0.gguf -p "Document: ...\n\nClaim: ..."
Benchmarks & Methodology (high level)
FlashCheck was trained on a curated mix of:
- AggreFact-style hallucination detection data
- Synthetic contrastive policy pairs to reduce keyword-matching failure modes
Limitations
- Optimized for English logic/policy checking.
- The model is best used as a guardrail / verifier, not a general chat assistant.
- Outputs may be sensitive to prompt format; keep prompts consistent.
Citation
@misc{nehme2025flashcheck,
title={FlashCheck: Efficient Logic Distillation for RAG Compliance},
author={NehmeAILabs},
year={2025},
publisher={Nehme AI Labs},
howpublished={\url{https://nehmeailabs.com}}
}
- Downloads last month
- 11
docker model run hf.co/nehmeailabs-org/nehme-flashcheck-270m:Q8_0