Pilot programme targeting Q3 2026. Register your interest now.Pilot EOI
UPAS
Getting Started

Configuration

Configure models, procedure packs, and runtime behaviour (prototype)

Prototype Documentation: Configuration options described here represent the intended design. Some options may not yet be fully implemented.

UPAS configuration covers model selection, procedure pack sources, and runtime behaviour.

Model Selection

UPAS supports multiple model configurations:

config/models.ts
const modelConfig = {
  // Primary model for WebGPU runtime
  webgpu: {
    modelId: "Qwen2.5-0.5B-Instruct-q4f16_1-MLC",
    contextLength: 4096,
  },
  
  // Fallback model for WASM runtime
  wasm: {
    modelUrl: "https://huggingface.co/.../model.gguf",
    contextLength: 2048,
  },
};

Model Trade-offs

FactorSmaller ModelsLarger Models
Download size50–500MB1–4GB
Inference speedFasterSlower
Response qualityBasicBetter
Memory usageLowerHigher
Device compatibilityWiderNarrower

For field deployments with limited connectivity and diverse devices, smaller models often provide a better trade-off between capability and reliability.

Procedure Packs

Configure which procedure packs to cache:

config/packs.ts
const packConfig = {
  sources: [
    {
      url: "https://cdn.example.org/packs/emergency-response-v3.2.1.json",
      domain: "emergency-response",
      locale: "en",
    },
    {
      url: "https://cdn.example.org/packs/wash-v2.1.0.json",
      domain: "wash",
      locale: "en",
    },
  ],
  
  // Sync behaviour
  sync: {
    checkInterval: 86400000, // 24 hours
    retryOnFailure: true,
    preserveRollback: true,
  },
};

Runtime Settings

Configure inference behaviour:

config/runtime.ts
const runtimeConfig = {
  // Inference parameters
  inference: {
    temperature: 0.7,
    topK: 40,
    maxTokens: 512,
    seed: undefined, // Random by default
  },
  
  // UI behaviour
  ui: {
    showRuntimeBadge: true,
    showProvenanceByDefault: true,
    enableDegradedMode: true,
  },
  
  // Caching
  cache: {
    version: "upas-cache-v1",
    modelCacheFirst: true,
  },
};

Environment Variables

For builds that support environment variables:

# Model configuration
UPAS_MODEL_ID=Qwen2.5-0.5B-Instruct-q4f16_1-MLC
UPAS_FALLBACK_MODEL_URL=https://huggingface.co/.../model.gguf

# Pack sources
UPAS_PACK_SOURCES=https://cdn.example.org/packs/manifest.json

# Feature flags
UPAS_ENABLE_DEGRADED_MODE=true
UPAS_SHOW_PROVENANCE=true

Storage Management

Configure cache and storage behaviour:

config/storage.ts
const storageConfig = {
  // Cache names
  caches: {
    app: "upas-app-v1",
    models: "upas-models-v1",
    packs: "upas-packs-v1",
  },
  
  // Cleanup policy
  cleanup: {
    maxAge: 2592000000, // 30 days
    maxSize: 2147483648, // 2GB
  },
};

Important: Changing cache version strings will invalidate existing caches. Plan cache migrations carefully for deployed devices.

Next Steps