Repository navigation
Closed
Labels
enhancementEnhancement requestgpuGPU acceleration relatedhigh-priorityHigh priorityloraLoRA adapter relatedv1.4.0Target version 1.4.0
Milestone
Description
name: "🚀 Feature: Multi-GPU LoRA Support"
about: Enable LoRA adapters to span multiple GPUs for distributed inference
title: "[v1.4.0] Implement Multi-GPU LoRA Support"
labels: enhancement, lora, gpu, high-priority, v1.4.0
assignees: ''
Feature Description
Enable LoRA adapters to be distributed across multiple GPUs, allowing larger adapters and higher throughput for multi-LoRA inference.
Motivation
- Scale: Support larger LoRA adapters that don't fit on single GPU
- Throughput: Parallel inference across multiple GPUs
- Flexibility: Efficient utilization of multi-GPU servers
- Cost: Better ROI on expensive multi-GPU hardware
Proposed Implementation
Configuration API
MultiGPUConfig gpu_config;
gpu_config.enabled = true;
gpu_config.devices = {0, 1, 2, 3}; // Use GPUs 0-3
gpu_config.strategy = MultiGPUStrategy::ROUND_ROBIN; // or DATA_PARALLEL
gpu_config.enable_peer_transfer = true; // GPUDirect
MultiLoRAManager manager(config, gpu_config);
// Load LoRA across multiple GPUs
manager.loadLoRA("large-lora", "/path/to/lora", false,
GPUPlacement::MULTI_GPU);
// Inference automatically distributed
auto response = manager.inference(request, "large-lora", context);Multi-GPU Strategies
-
Round-Robin: Distribute LoRAs evenly across GPUs
- Simple load balancing
- Good for many small adapters
-
Data Parallel: Replicate adapter on all GPUs
- Higher throughput for popular adapters
- Trade memory for performance
-
Model Parallel: Split large adapter across GPUs
- Support adapters larger than single GPU
- Requires inter-GPU communication
Technical Approach
- GPU Placement: Track which GPU(s) hold each LoRA
- Load Balancing: Route requests to appropriate GPU
- Peer Transfer: Use CUDA Peer-to-Peer for fast inter-GPU communication
- Memory Management: Unified VRAM tracking across all GPUs
- Fault Tolerance: Handle GPU failures gracefully
Files to Modify
include/llm/multi_lora_manager.h- Add multi-GPU configsrc/llm/multi_lora_manager.cpp- GPU placement and routinginclude/llm/gpu_memory_manager.h- Multi-GPU memory trackingsrc/llm/gpu_memory_manager.cpp- Implementationsrc/llm/llamacpp_plugin.cpp- CUDA integrationtests/test_multi_gpu_lora.cpp- New test suite
Success Metrics
- Support 4+ GPUs simultaneously
- Linear scaling for round-robin (4 GPUs = 4× throughput)
- Inter-GPU latency <2ms with GPUDirect
- Memory utilization >90% across all GPUs
- Handle GPU failures gracefully
- Pass 30+ multi-GPU test scenarios
Use Cases
- Large-scale inference serving (>100 req/s)
- Multiple large LoRA adapters (>2GB each)
- Multi-tenant platforms with SLA guarantees
- Research clusters with 8-GPU servers
Estimated Effort
5-6 weeks (1-2 developers)
- Week 1-2: GPU placement and routing logic
- Week 3: Inter-GPU communication (GPUDirect)
- Week 4: Memory management and load balancing
- Week 5: Testing and optimization
- Week 6: Documentation and benchmarking
Priority
High - Enables scale beyond single GPU limits
References
Dependencies
- CUDA 11.0+ with GPUDirect support
- Multiple GPUs with NVLink preferred
- llama.cpp multi-GPU support
Acceptance Criteria
- Multi-GPU placement working (round-robin, data parallel, model parallel)
- Load balancing across GPUs
- GPUDirect integration for fast transfers
- Unified VRAM tracking
- Fault tolerance for GPU failures
- 30+ test cases including multi-GPU scenarios
- Documentation with multi-GPU examples
- Benchmarks showing linear scaling
- Prometheus metrics per GPU
- Code review approved
Reacted by Copilot
Metadata
Metadata
Labels
enhancementEnhancement requestgpuGPU acceleration relatedhigh-priorityHigh priorityloraLoRA adapter relatedv1.4.0Target version 1.4.0
Activity
feat(storage): implement Online Schema Migration (v1.7.0, Issue #208)
fix: resolve stubs #189 #190 #207 #208 #216 #217 — PITR timestamp sel…