Method GetPredefinedModelCards
GetPredefinedModelCards(bool)
Retrieves a predefined list of commonly used ModelCard instances.
public static List<ModelCard> GetPredefinedModelCards(bool dropSmallerModels = false)
Parameters
dropSmallerModelsboolA flag indicating whether to exclude smaller models from the same family if a larger model in the family achieves 100% performance on the target machine.
Returns
Examples
using LMKit.Model;
using System;
using System.Linq;
// Get all predefined models
var allModels = ModelCard.GetPredefinedModelCards();
Console.WriteLine($"Total available models: {allModels.Count}");
// Get optimized list (drops smaller models when larger ones run at full speed)
var optimizedModels = ModelCard.GetPredefinedModelCards(dropSmallerModels: true);
Console.WriteLine($"Optimized for this machine: {optimizedModels.Count}");
// List text generation models
var textGenModels = allModels
.Where(c => c.Capabilities.HasFlag(ModelCapabilities.TextGeneration))
.OrderBy(c => c.ParameterCount);
foreach (var card in textGenModels.Take(5))
{
Console.WriteLine($"{card.ModelID}: {card.ParameterCount/1_000_000}M params");
}