KillerKing93/Transformers-TextEngine-OpenAPI
0
1# Server2PORT=30003 4# Database (Marketplace)5# SQLite (default for development)6DATABASE_URL=sqlite:///./marketplace.db7# PostgreSQL example: postgresql://user:password@localhost/marketplace8# MySQL example: mysql+pymysql://user:password@localhost/marketplace9 10# Authentication (JWT)11# IMPORTANT: Change JWT_SECRET_KEY in production! Use a strong random secret.12JWT_SECRET_KEY=your-super-secret-jwt-key-change-in-production13ACCESS_TOKEN_EXPIRE_MINUTES=3014REFRESH_TOKEN_EXPIRE_DAYS=715 16# Model from Hugging Face (Transformers)17MODEL_REPO_ID=unsloth/Qwen3-4B-Instruct-250718# HF token for gated/private models (optional)19HF_TOKEN=20 21# Inference parameters22MAX_TOKENS=409623TEMPERATURE=0.724 25# Multimedia processing26MAX_VIDEO_FRAMES=1627 28# Transformers loading hints29DEVICE_MAP=auto30TORCH_DTYPE=auto31 32# Quantization config (BitsAndBytes 4-bit) - Disabled for CPU deployment33# Enable 4-bit quantization to reduce VRAM usage (~5GB -> ~1.5GB)34LOAD_IN_4BIT=035BNB_4BIT_COMPUTE_DTYPE=float1636BNB_4BIT_USE_DOUBLE_QUANT=137BNB_4BIT_QUANT_TYPE=nf438 39# Concurrency config40MAX_WORKERS=441OCR_TIMEOUT_SECONDS=12042# Persistent SSE session store (SQLite)43# Enable to persist streaming chunks per session_id and allow resume after server restarts.44# 1=true, 0=false45PERSIST_SESSIONS=146SESSIONS_DB_PATH=sessions.db47# TTL for sessions (seconds). Finished sessions older than TTL are garbage collected.48SESSIONS_TTL_SECONDS=60049# Auto compression and context reporting50# Enable automatic prompt compression if context would overflow. Drops oldest non-system messages.51ENABLE_AUTO_COMPRESSION=152# Force a max context window for budgeting; 0 = use model/tokenizer defaults53CONTEXT_MAX_TOKENS_AUTO=054# Safety margin kept free for generation and special tokens55CONTEXT_SAFETY_MARGIN=25656# Compression strategy: truncate (default). summarize reserved for future use.57COMPRESSION_STRATEGY=truncate