initContext method
Future<Map<Object?, dynamic> ?>
initContext(
- String model, {
- int modelType = 1,
- bool embedding = false,
- int nCtx = 768,
- int nBatch = 768,
- int nThreads = 2,
- int nGpuLayers = 0,
- bool useMlock = true,
- bool useMmap = true,
- String lora = "",
- bool loraInitWithoutApply = false,
- double loraScaled = 1.0,
- double ropeFreqBase = 0.0,
- double ropeFreqScale = 0.0,
- bool emitLoadProgress = false,
override
Implementation
@override
Future<Map<Object?, dynamic>?> initContext(String model,
{int modelType = 1,
bool embedding = false,
int nCtx = 768,
int nBatch = 768,
int nThreads = 2,
int nGpuLayers = 0,
bool useMlock = true,
bool useMmap = true,
String lora = "",
bool loraInitWithoutApply = false,
double loraScaled = 1.0,
double ropeFreqBase = 0.0,
double ropeFreqScale = 0.0,
bool emitLoadProgress = false}) async {
return await methodChannel
.invokeMethod<Map<Object?, dynamic>>("initContext", {
"model": model,
"modelType": modelType,
"embedding": embedding,
"n_ctx": nCtx,
"n_batch": nBatch,
"n_threads": nThreads,
"n_gpu_layers": nGpuLayers,
"use_mlock": useMlock,
"use_mmap": useMmap,
"lora": lora,
"lora_scaled": loraScaled,
"lora_init_without_apply": loraInitWithoutApply,
"rope_freq_base": ropeFreqBase,
"rope_freq_scale": ropeFreqScale,
"emit_load_progress": emitLoadProgress
});
}