How deeepak-17/clasp works
CLASP is an on-premise federated code-generation system: clients train local LoRA adapters, a cluster aggregates them, and the registry versions and promotes adapters for later use. Evaluation measures code-generation quality and presents results in a dashboard. The graph preserves the documented training, aggregation, registry, personalization, security, and evaluation capabilities. Some implementation paths are included from the repository tree and README rather than sampled source; those links are marked dashed when their wiring is not shown.
Main entry points: server.py Federation Server · train_client.py Client LoRA Training · app.py Registry API · harness.py Evaluation Harness
Components 22
Edge Layer
- Client LoRA Training
services/edge/src/edge/train_client.py - Code Chunking
services/edge/src/edge/chunking.py - Model Loading
services/edge/src/edge/model_loader.py - Adapter Merge & Inference
services/edge/src/edge/merge.py - Edge Registry Client
services/edge/src/edge/registry_client.py
Cluster Layer
- Federation Server
services/cluster/src/cluster/server.py - Federated Aggregation
services/cluster/src/cluster/aggregation.py - LoRA Adapter Format
services/cluster/src/cluster/adapter_format.py - Client Clustering
services/cluster/src/cluster/clustering.py - Adapter Redistribution
services/cluster/src/cluster/redistribution.py
State Registry
- Registry API
services/registry/src/registry/app.py - Versioned Adapter Store
services/registry/src/registry/storage.py - Composite Adapters
services/registry/src/registry/composition.py - Promotion & Rollback
services/registry/src/registry/promotion.py
Evaluation
- Evaluation Harness
services/evaluation/src/evaluation/eval_harness/harness.py - Pass@k Scoring
services/evaluation/src/evaluation/eval_harness/scoring.py - Sandboxed Execution
services/evaluation/src/evaluation/eval_harness/execution.py - Evaluation Dashboard
services/evaluation/dashboard/src/App.tsx
Shared Contracts & Security
- Shared Data Contracts
contracts/src/contracts/types.py - Differential Privacy
security/src/security/dp/engine.py - mTLS Security
security/src/security/mtls/context.py
Other components
- Developer
Connections 23
- Developer → Client LoRA Training: trains locally
- Client LoRA Training → Code Chunking: uses chunks
services/edge/src/edge/train_client.py - Client LoRA Training → Model Loading: loads model
services/edge/src/edge/train_client.py - Client LoRA Training → Differential Privacy: applies DP
- Client LoRA Training → Federation Server: submits adapter
- Federation Server → Federated Aggregation: aggregates updates
services/cluster/src/cluster/server.py - Federation Server → LoRA Adapter Format: encodes updates
services/cluster/src/cluster/server.py - Federation Server → Client Clustering: orchestrates clients
services/cluster/src/cluster/server.py - Federation Server → Adapter Redistribution: redistributes adapters
services/cluster/src/cluster/server.py - Federation Server → Registry API: publishes aggregate
services/cluster/src/cluster/server.py - Federation Server → mTLS Security: secures transport
- Registry API → Versioned Adapter Store: reads and writes
services/registry/src/registry/app.py - Registry API → Composite Adapters: plans composites
services/registry/src/registry/app.py - Registry API → Promotion & Rollback: promotes adapters
services/registry/src/registry/app.py - Registry API → Shared Data Contracts: uses contracts
services/registry/src/registry/app.py - Edge Registry Client → Registry API: fetches adapters
- Edge Registry Client → Adapter Merge & Inference: supplies adapters
- Client LoRA Training → Adapter Merge & Inference: uses cluster adapter
services/edge/src/edge/train_client.py - Evaluation Harness → Edge Registry Client: requests inference
- Evaluation Harness → Sandboxed Execution: runs candidates
- Evaluation Harness → Pass@k Scoring: scores outcomes
- Evaluation Dashboard → Evaluation Harness: presents results
- Federated Aggregation → Shared Data Contracts: shares adapter metadata