YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

EntroFRS - Offline Employee/FRS Summarization

License: MIT Python 3.10+

EntroFRS is a lightweight, offline, question-aware Employee/FRS data summarization system.
It runs entirely locally after the first setup β€” no cloud APIs, no paid services, no internet required at inference time.

Architecture

EMPLOYEE/FRS DATA
        ↓
INPUT FORMAT NORMALIZATION
  (JSON / Key-Value / Pipe / Natural Language / Mixed)
        ↓
QUESTION/INTENT UNDERSTANDING
  (Rules + INT8 Hashed-Feature Linear Classifier)
        ↓
FACT EXTRACTION & GROUNDING
  (Schema-aware deterministic parsing)
        ↓
GROUNDED RENDERER
  (Controlled English generation from extracted facts)
        ↓
QUESTION-SPECIFIC PROFESSIONAL SUMMARY

Why This Architecture?

Criterion Generative LLM This System
Model size < 25 MB Very difficult βœ… ~150 KB model assets
Factual accuracy Hallucination risk βœ… Copies source facts
Question relevance Requires instruction tuning βœ… Intent-based selection
CPU inference speed Slow βœ… Sub-millisecond
Offline capability Needs large download βœ… Tiny, fully offline
No paid APIs Often needs cloud βœ… 100% local

Quick Start

Installation

# Install from source
pip install -e .

# Or with API support
pip install -e ".[api]"

Generate Dataset, Train, Export

# 1. Generate synthetic training data
python -m entrofrs_llm.tools dataset

# 2. Train the intent classifier
python -m entrofrs_llm.tools train

# 3. Export INT8 quantized model
python -m entrofrs_llm.tools export

# 4. Evaluate on 200 test cases
python -m entrofrs_llm.tools evaluate

# 5. Measure model size
python -m entrofrs_llm.tools measure

# 6. CPU benchmark
python -m entrofrs_llm.tools benchmark

Python API

from entrofrs_llm import EntroFRSModel

model = EntroFRSModel.load()

# JSON input
response = model.summarize(
    {
        "employee_name": "Robert Anderson",
        "role": "DevOps Engineer",
        "manager": "Karen White",
        "work_date": "August 24, 2026",
        "attendance": "Late",
        "working_hours": "8.50",
        "overtime": "0.50"
    },
    question="What is Robert's role?"
)
print(response)
# β†’ "The employee's role is DevOps Engineer."

# Key-value text input
response = model.summarize(
    "Employee: Robert Anderson\nRole: DevOps Engineer\nManager: Karen White",
    question="Who is the manager?"
)
print(response)
# β†’ "Manager: Karen White."

# Missing information
response = model.summarize(
    {"employee_name": "Robert Anderson", "role": "DevOps Engineer"},
    question="What was the overtime?"
)
print(response)
# β†’ "The requested information is not available in the provided employee data."

FastAPI Server

export ENTROFRS_API_KEY="your-secret-key"
uvicorn entrofrs_llm.api:app --host 127.0.0.1 --port 8000
curl http://127.0.0.1:8000/summarize \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: your-secret-key' \
  -d '{
    "data": {"employee_name": "Robert Anderson", "role": "DevOps Engineer"},
    "question": "What is the employee role?"
  }'

Endpoints:

  • GET /health β€” Health check
  • GET /info β€” Model information
  • POST /summarize β€” Question-aware summarization

Supported Input Formats

Format Example
JSON {"employee_name": "Robert", "role": "Engineer"}
Key-Value Employee: Robert\nRole: Engineer
Pipe (header) Employee | Role\nRobert | Engineer
Natural Language Robert is an Engineer reporting to Karen.
Mixed Employee: Robert\nThe role is Engineer.

Supported Fields

Field Aliases
employee_name employee, name, emp name
employee_id emp id, staff id
role designation, job title
department dept
manager reporting manager, reports to
location office location
joining_date date joined, join date
team team name
work_date date
attendance attendance status
present_days days present
absent_days days absent
late_days days late
attendance_percentage attendance percent, attendance pct
leave leave information, leave info
clock_in clock in, check in
clock_out clock out, check out
working_hours work hours, hours worked
effective_hours effective work hours
overtime overtime hours, ot
tasks task
completed_tasks completed task, tasks completed
project projects, project name
task_status status
approval_status approval
comments comment, notes
technologies technology stack, tech stack
worklogs worklog, work logs, time logs

Model Caching

After the first load, the model is cached at:

  • Linux/macOS: ~/.cache/entrofrs/<content-hash>/
  • Custom: Set ENTROFRS_CACHE environment variable

Subsequent loads use the cached version. No internet required after initial setup.

Evaluation Metrics

The evaluation system measures:

  • Factual accuracy β€” Are source facts copied correctly?
  • Numeric accuracy β€” Are numbers preserved exactly?
  • Date accuracy β€” Are dates matched correctly?
  • Entity accuracy β€” Are names/roles/projects correct?
  • Question relevance β€” Does the answer address only the question?
  • Hallucination rate β€” Are unsupported facts added?
  • Field coverage β€” Are all expected fields present?
  • Response conciseness β€” Is the answer appropriately sized?
  • Intent accuracy β€” Is the question correctly classified?
  • Format robustness β€” Does accuracy hold across input formats?

Project Structure

entrofrs/
β”œβ”€β”€ pyproject.toml          # Build configuration
β”œβ”€β”€ requirements.txt        # Dependencies
β”œβ”€β”€ LICENSE                 # MIT License
β”œβ”€β”€ README.md               # This file
β”œβ”€β”€ entrofrs_llm/
β”‚   β”œβ”€β”€ __init__.py         # Public API
β”‚   β”œβ”€β”€ schema.py           # Field definitions, tokenizer, features
β”‚   β”œβ”€β”€ core.py             # Normalization, intent routing, rendering
β”‚   β”œβ”€β”€ artifacts.py        # Model caching and verification
β”‚   β”œβ”€β”€ api.py              # FastAPI endpoints
β”‚   β”œβ”€β”€ data.py             # Dataset generation
β”‚   β”œβ”€β”€ tools.py            # CLI: train, export, evaluate, benchmark
β”‚   └── model/              # Exported INT8 model assets
β”‚       β”œβ”€β”€ intent.int8.npz
β”‚       β”œβ”€β”€ config.json
β”‚       β”œβ”€β”€ manifest.json
β”‚       └── LICENSE
β”œβ”€β”€ datasets/               # Generated training/test data
β”œβ”€β”€ artifacts/              # FP32 training checkpoints
└── reports/                # Evaluation and benchmark results

Design Principles

  1. FACTUAL GROUNDING > FLUENCY β€” Source facts are copied, never generated
  2. QUESTION RELEVANCE > GENERIC SUMMARY β€” Intent-based field selection
  3. ACCURACY > MODEL SIZE β€” But still under 25 MB
  4. FAIL CLOSED β€” Abstain on ambiguous or conflicting data

License

MIT β€” See LICENSE

Downloads last month
46
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support