RuntimeConfig constructor

const RuntimeConfig({
  1. required int maxTokens,
  2. required String modelPath,
  3. String? tokenizerPath,
  4. PreferredBackend? preferredBackend,
  5. bool supportImage = false,
  6. bool supportAudio = false,
  7. int? maxNumImages,
  8. bool? enableSpeculativeDecoding,
  9. int? maxConcurrentSessions,
  10. List<int>? loraRanks,
})

Implementation

const RuntimeConfig({
  required this.maxTokens,
  required this.modelPath,
  this.tokenizerPath,
  this.preferredBackend,
  this.supportImage = false,
  this.supportAudio = false,
  this.maxNumImages,
  this.enableSpeculativeDecoding,
  this.maxConcurrentSessions,
  this.loraRanks,
})  : assert(maxTokens >= 0, 'maxTokens must not be negative'),
      assert(maxNumImages == null || maxNumImages >= 0,
          'maxNumImages must not be negative'),
      assert(maxConcurrentSessions == null || maxConcurrentSessions > 0,
          'maxConcurrentSessions must be positive when set');