Svashasan Logo

A Private, Fine-Tuned, Self-Hosted Intelligence Platform for Svashasan Labs

Purpose: How Svashasan Labs will build its own internal intelligence platform: an open-weight language model, adapted with LoRA, grounded in our own data through retrieval, operating inside an agentic harness, and self-hosted on a VPS we control.

Status note. Based on the Svashasan Intelligence PRD v1.0 (17 November 2026). Today a starter scaffold exists: a FastAPI service, PostgreSQL/pgvector schema and a basic ingestion route. Connectors, retrieval, identity, agents and the model runtime are planned. Fine-tuning is deliberately scheduled after the retrieval baseline, and no base model has been finally selected.

Know

Retrieval over our data

Answers grounded in Zoho, Git, documents and databases, with citations.

Behave

A LoRA-tuned open model

A small adapter teaches tool use, citation and refusal; facts stay out of the weights.

Act

Inside an agentic harness

Read-only tools first; anything consequential waits for a human.

Own

Self-hosted on our VPS

Company data stays on infrastructure Svashasan controls.


1. What We Are Building

Svashasan Intelligence is a private platform that organises company knowledge, answers questions with evidence, supports analysis and reporting, and later runs carefully permissioned workflows. It is an internal business and engineering plane, entirely separate from Svashasan OS in the vehicle.

Two-system boundarySvashasan OS — vehicle product planeSensorsPerception & fusionPlanningControl & safety supervisorVehicle OTASvashasan Intelligence — company planeZoho · Git · documents · DBGoverned ingestionKnowledge store + ACLPrivate model runtimePolicy-controlled agentsNo intelligence-to-actuator, safety-calibration or OTA-release authority. Engineering knowledge flows in read-only.
Figure 1. Two planes, one hard wall. Svashasan Intelligence may read approved engineering material about Svashasan OS, but it is never part of the real-time vehicle path.

2. The Architecture

Five principles shape it: private by default, retrieval before fine-tuning, permissions before prompting, human approval for consequential actions, and a replaceable model layer.

Logical architectureApproved sourcesZoho CRMZoho MailEngineering docsGit repositoriesInternal databasesIngestion planeConnectorsRaw object storeParse + normaliseDedupe + qualityClassify · approveKnowledge planeMetadata + ACL + auditChunkingEmbeddingspgvector indexRetrieval + rerankIntelligence planeFastAPI gatewayIdentity + RBACPolicy engineModel runtime + LoRAAgent orchestratorOperations & governance: logs, metrics, alerts · encrypted backups · evaluation harness · admin reviewspans every plane
Figure 2. The platform in four planes. Data enters through governed ingestion, becomes searchable knowledge with access controls attached, and only then reaches the model, which sits behind identity and policy.

3. Our Data, Governed

Initial sources are Zoho CRM, Zoho Mail, engineering documents, Git repositories and internal databases, all read-only. The Zoho CRM and Mail ingestion already specified for Svashasan Investor Intelligence becomes one governed feed into this platform.

Data lifecycle with two gatesDiscoversource recordAllow-listcheckSnapshotraw bytes + SHA-256Extract &normaliseDedupe &link versionsPrivacy, rights& quality checksOwner, class+ ACL assignedData-ownerreviewQuarantineor reject + audit eventapproved for RAGKnowledge corpuschunk · embed · indexseparatewrittenapprovalTraining candidateredacted · versioned · splitACL-filtered retrievalRAG approval doesnot imply trainingapproval.
Figure 3. Two separate gates. A document approved for retrieval is not automatically approved for training; fine-tuning data needs its own written approval, rights review, redaction and versioning.

Classification

Data classificationClassificationExamplesRetrieval (RAG)Trainingpublicapproved public releasesall authenticatedeligible after reviewinternalordinary operating informationinternal roleseligible after reviewconfidentialfinance, investor mail, partnershipsexplicit role / ownercase-by-case, redactedrestrictedpatent drafts, security materialnamed approvalexcluded by defaultCredentials, tokens, keys, OTPs and reset links are never indexed or trained on, at any level.
Figure 4. Classification decides everything downstream. Missing classification, ACL or approval means the system fails closed: no retrieval, no training.

4. Retrieval First: Why Answers Stay True

“Training it on our own data” has two meanings, and the platform separates them deliberately.

Knowledge versus behaviourKnowledge → retrieval (RAG)Behaviour → LoRA adapterCurrent company facts and figuresTool-calling format for the harnessCRM records, investor threads, dealsCitation and answer structureEngineering documents and codeWhen to refuse or flag evidence gapsAnything that changes or has an ownerSvashasan terminology and report styleCited at answer time, permission-filteredNever: secrets, restricted IP, stale facts
Figure 5. The most important design decision. Facts live in governed source records and are retrieved with citations; the LoRA adapter teaches the model how to behave inside our harness. Baking facts into weights would make them uncitable, unrevocable and stale.

A question, end to end

Permission-aware RAG queryUserFastAPIIdentityPolicyRetrievalpgvectorModelAuditquestionvalidate identityuser + rolesauthorise scopeallowed filtersquery + filterssearch with ACLpermitted chunkschunks + provenanceprompt + min. contextdraft answervalidate citationsrecord eventanswer + citations
Figure 6. One question, end to end. Access control is applied inside the database search, before any text reaches the model, and every citation is re-checked against what the user is allowed to see.

5. Fine-Tuning with LoRA

Once retrieval works, a LoRA adapter makes the open-weight model a better participant in our harness. Qwen3-8B is a candidate for evaluation, not a final choice; the base model is selected on licence, provenance, tool-calling behaviour and measured CPU performance.

How LoRA worksInput xFrozen baseweights W7–8B parametersnever modifiedd × d+Ad × r×Br × dtrainable · r = 16W + A·Badapted outputOnly A and B train — a small adapter file, typically well under 1% of the model — swappable and revocable without touching the base model
Figure 7. LoRA in one picture. The base model stays frozen; we train two thin matrices whose product nudges its behaviour. QLoRA does the same over a 4-bit quantised base so a 7–8B model fits on a single rented 24 GB GPU.

The training pipeline

LoRA training pipeline300–800 exampleshuman-reviewedRedact & minimiseno secrets / PIIVersion datasettime-aware splitsQLoRA runrented GPU, hoursAdapterhash + manifestEvaluationgates must passRegistrypromote or rejectVPSloadadapterManifest records base-model hash, dataset version, code commit, hyperparameters, adapter hash and results.Confidential data goes to a third-party GPU only under approved contractual, security and data-processing terms.
Figure 8. How an adapter is made. Training is a short, rented-GPU job; the result is a small, hashed adapter file that must pass evaluation before the self-hosted runtime loads it.

Starting configuration

QLoRA starting configurationqlora-pilot.yaml (template)base_modelverified 7–8B instructadapterqloraload_in_4bittrue · nf4lora_r / alpha16 / 32lora_dropout0.05sequence_len4096batch × accum1 × 16epochs2learning_rate1e-4Rank 16Small enough to train cheaply, large enough to learn tool format and style.4-bit baseFits a 7–8B model and its adapter on one 24 GB GPU.Two epochsFew passes over a small set, to avoid memorising examples.Template onlyChat template, target modules and memory verified per model.
Figure 9. The starting configuration from the PRD. These are template values to verify against the selected checkpoint, not tuned settings.

Proving it was worth it

Evaluation and promotion gatesBase modelno retrievalBase + RAGPhase 1 baselineBase + RAG + LoRAPhase 2 pilotPromotion gates — an adapter ships only if it beats Base + RAG and passes all four:1Citation coverage≥ 95% of answerable questions2Answer acceptance≥ 80% on pilot task set3Unauthorised disclosure0 in adversarial ACL tests4Unauthorised tool actions0 in policy testsCritical failures — fabricated citations, unauthorised disclosure or action — block release regardless of average score.
Figure 10. How we decide whether fine-tuning was worth it. The adapter has to beat retrieval alone on a fixed evaluation set; if it does not, it does not ship.

6. The Agentic Harness

The agent layer coordinates approved tools but never owns the permission model; the API and policy service are authoritative. All retrieved documents, emails and code comments are treated as untrusted evidence, never as instructions.

Agent operating flowUser requestAuthenticate+ authoriseIntentclassificationBoundedtask planPolicycheckread-onlyAllow-listedread toolValidate resultSynthesisewith evidenceAnswer+ citationsconsequentialHuman approvalqueueapprovedApproved executorAudit action + resultRefuse / explaindenied or rejecteddenied by policy, or rejected by approver
Figure 11. The agentic harness. The model proposes; the policy service decides. Read-only tools run directly, anything consequential waits for a human, and every action is audited.

What “harness-compatible” means

Harness compatibilityThe adapter teaches the model to…The harness enforces, outside the model…Emit tool calls in the exact JSON schemaWho the user is and what they may seeFollow the model’s chat template reliablyWhich tools exist and their argument limitsCite chunk IDs it was actually givenServer-side validation of every tool callSay “not in the evidence” instead of guessingHuman approval for consequential actionsAsk for approval instead of actingAudit trail; retrieved text is never an instruction
Figure 12. “Harness-compatible” means two halves. Fine-tuning makes the model a reliable, well-formatted participant; the harness keeps all authority. A model can be persuaded by a malicious email; a server-side policy check cannot.

Tool tiers

Agent tool tiersP0 · read-onlyPhase 1• search engineering docs• repo files + commit context• query approved CRM records• summarise approved mail threads• fixed database queriesP1 · draft & proposeafter approval workflow• draft email replies — not sent• CRM update proposals — not committed• infrastructure change plans• financial summaries — no paymentsNeverby design• vehicle actuation or calibration• OTA signing or release• unrestricted SQL or email• autonomous legal commitments
Figure 13. What the agents may do. The tool catalogue grows only as each tier proves safe; the right-hand column is a permanent boundary, not a backlog.

7. How It Powers Our Development

How the platform powers developmentSvashasanIntelligenceEngineering“Where is the OTA rollbacklogic?” → answer withcommit-level citationsFounder & investorspipeline briefs from Zoho CRM +Mail (the investor-intelligencedata)Partnershipspartner history in one place;replies drafted, neverauto-sentDevOpsrunbooks, incident history,change plans for reviewOperationsweekly reports generated fromcited internal dataResearch & validationbenchmarks, test evidence anddecisions, traceable
Figure 14. What it does for the company. One governed knowledge layer serves engineering, fundraising, partnerships and operations; each team sees only what its role permits.

The development flywheel

Development flywheelEngineer asks“how did we solve X?”Cited answerdocs + commitsBuilds fasterreuses decisionsCommits + docsnew knowledgeGit connectorre-ingestsCompany memorythat compounds
Figure 15. The development flywheel. Every commit and document becomes searchable context for the next engineer, so a small team keeps its decisions instead of rediscovering them.

8. Self-Hosted on a VPS

The platform runs on one hardened server: Ubuntu 24.04, 4–8 vCPUs, 32 GB RAM, Docker Compose with pinned images, and no public database or model ports. The PRD names Oracle Cloud Infrastructure as the first host; the same stack runs on any VPS that meets the specification.

Self-hosted VPS deploymentAuthorised userSSO + MFATLSSelf-hosted VPS · Ubuntu 24.04 · 4–8 vCPU · 32 GB RAM · private networkCaddy / NginxTLS reverse proxyFastAPI gatewayidentity · policyAgent orchestratorLangGraph or equalPostgreSQL+ pgvector · ACL · auditModel runtimequantised 7–8B + LoRAIngestion workerZoho · Git · docsObject storageMinIO · raw bytesEncrypted backupstested restoresMonitoringmetrics · alertsDatabase and model ports are never public · Docker Compose with pinned images · SSH keys onlyModel runtime stays CPU-first; it serves, it does not trainRented GPUshort-lived · training onlyadapter file inZoho CRM · Mail · Git · docsread-only OAuth / tokens
Figure 16. Self-hosted on one VPS. Everything that touches company data runs on a server we control; a GPU is rented only for short training runs, and only the adapter comes back.

Security layers

Security layersTenancyMFA · least-privilege IAM · budget alertsNetworkprivate subnet · firewall · no public DB/model portsHostpatching · SSH keys only · no root loginContainerspinned images · non-root · image scanningSecretssecret manager · rotation · never in GitIdentityOIDC/SSO · MFA for privileged usersRetrievalACL filtering before context assemblyModelprivate runtime · retrieved text treated as untrustedToolsallow-list · server validation · approval gatesAudit & backupsappend-only events · encrypted · restore-tested
Figure 17. Security, layer by layer. The three dark layers are specific to an AI system: permissions applied before the model sees data, retrieved content treated as untrusted, and tools that the model cannot authorise for itself.

What it costs

Monthly budget envelopeCPU VPS₹2,000–3,500Temporary GPU experiments₹2,000–3,000Storage & backups₹500–1,000Contingency₹1,000Network / misc.₹500Monitoring / security₹500Total allocation ₹6,500–9,500 a month against a ₹10,000 cap
Figure 18. The monthly envelope from the PRD: an allocation model, not a vendor quote. If real costs exceed the cap, GPU experiments shrink first, never security or backups.
Why no always-on GPUAlways-on 24 GB GPU (A10 reference, ₹191.09/hr × 730 hrs)≈ ₹1,39,495 / monthOur entire monthly budget₹10,000 ≈ 52 GPU-hours, before storage and taxDecision: serve on CPU, rent GPU by the hour for training runs only. Re-check OCI or VPS pricing before provisioning.
Figure 19. Why the VPS has no GPU. A published reference price puts an always-on A10 at about fourteen times the whole monthly budget.

9. Roadmap

Delivery roadmapd0d5d10d15d20d25d30d35d40d45Phase 0 · cloud foundationSprint 1 · data foundationSprint 2 · ingestion & governanceSprint 3 · Git connectorSprint 4 · Zoho connectorsSprint 5 · RAG & evaluationSprint 6 · identity & agent policySprint 7 · model baseline & pilotPhase 2 · small-model LoRA pilotonly after baseline is stable and training data is approvedLater · 70B-class researchseparately funded multi-GPU stage
Figure 20. The delivery plan. Upper-bound estimates in working days, sequential here for clarity; the PRD expects a 4–6 week calendar for a small team with some work in parallel. Fine-tuning comes after the platform works without it.
Release gatesGate 0Infrastructure readyGate 1Data foundationGate 2Governed ingestionGate 3RAG readyGate 4Internal pilotGate 5Agentic workflowsStarter scaffold today: FastAPI service, PostgreSQL/pgvector schema and a basic ingestion route.Everything from Gate 0 onward is ahead.
Figure 21. Release gates. Each is a pass/fail checkpoint; agentic workflows come last, after the platform has proven it answers correctly and safely.

10. Principles That Do Not Change

DecisionWhat it means
CPU-first deploymentServe on CPU within budget; rent GPU only for experiments and training
Retrieval before fine-tuningFacts come from governed sources with citations; adapters change behaviour only
Access control before model contextThe model never sees text the user is not allowed to see
Read-only connectors firstNo writes to CRM, mail, Git or databases until approval workflows exist
Replaceable model layerSwap the base model or adapter without migrating data
Not a vehicle control planeNo path from the intelligence platform to actuation, calibration or OTA release
Our data stays ours, our facts stay citable, and the model stays replaceable: Svashasan Intelligence is built so the company gets smarter without handing its knowledge, or its authority, to the model.