Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

29.8 KB
Raw Blame
/**
 * Texts of the strand "models". Every text a user can read in this strand's
 * screens lives here, not in JSX, so the guard reads them in one place.
 * English, short sentences, no dashes, "Tap" instead of the desktop verb,
 * "this phone" instead of "your machine".
 *
 * Sizes are handed in as finished text. They come from formatBytes in
 * lib/formatters.ts, the one place that turns bytes into words.
 */
import { UNFILTERED_MARK_LABEL } from '../../lib/unfiltered-mark'
import { hubNamed } from '../policy/gates'

/** A getter here is a text in two wordings; the store switches of the build pick one (policy/gates.ts). */
export const MODELS_STRINGS = {
  common: {
    back: 'Back',
    continue: 'Continue',
    skip: 'Skip for now',
    tryAgain: 'Try again',
    checking: 'Checking',
    close: 'Close',
    cancel: 'Cancel',
    pause: 'Pause',
    resume: 'Resume',
    remove: 'Remove',
    retry: 'Retry',
    keep: 'Keep',
    download: 'Download',
    downloadSize: (size: string) => `Download ${size}`,
    pauseName: (name: string) => `Pause download of ${name}`,
    resumeName: (name: string) => `Resume download of ${name}`,
    cancelName: (name: string) => `Cancel download of ${name}`,
    removeName: (name: string) => `Remove download of ${name}`,
    retryName: (name: string) => `Retry download of ${name}`,
    downloadName: (name: string, size: string) => (size ? `Download ${name}, ${size}` : `Download ${name}`),
    recommended: 'Recommended',
    installed: 'Installed',
    loaded: 'Loaded',
    noInternet: 'No internet',
    loadingCatalog: 'Loading models',
  },

  fit: {
    // Everything in this group is worked out from sizes, not measured on the phone, and says so: "should",
    // "may", "about", "likely" (acceptance row L2.4, test estimates-are-marked).
    fits: 'Should run well on this phone',
    tight: 'Tight fit, may be slow',
    /** A small model (up to 4 billion parameters) in a 1 or 2 bit packing: the answers are what suffers. */
    coarse: 'Packed very small, answers may be poor',
    tooLarge: 'Too large for this phone',
    unknown: 'Size unknown',
    unknownDevice: 'LU could not read the memory of this phone',
    /** Card, one sentence with the reason. */
    tooLargeShort: (need: string, usable: string, ram: string) =>
      `Needs about ${need} of memory. About ${usable} of the ${ram} in this phone can go to a model.`,
    tooSmallDevice: 'This phone has less memory than on device models need. You can still use LU Cloud.',
    tooLargeToast: (need: string, usable: string) => `Too large. It needs about ${need} of memory and this phone can give a model about ${usable}.`,
    /** M2, whole sentences. */
    fitsLong: (need: string, usable: string) =>
      `This model needs about ${need} of memory while it runs. This phone can give a model about ${usable}, so it should run well. This is an estimate from the size of the model, not a measurement on this phone.`,
    tightLong: (need: string, usable: string) =>
      `This model needs about ${need} of memory while it runs. This phone can give a model about ${usable}, which is close to the limit. Other apps may be closed while it runs, and it may be slow.`,
    slowLong: (need: string, usable: string, ram: string) =>
      `This model needs about ${need} of memory while it runs, and this phone can give a model about ${usable}. It fits, but a model of this size is likely to answer slowly on a phone with ${ram}. A smaller model is quicker.`,
    coarseLong: (need: string, usable: string, packing: string) =>
      `This model needs about ${need} of memory while it runs, and this phone can give a model about ${usable}. It fits, but ${packing ? `${packing} is` : 'this is'} a very small packing of a small model, and its answers can be wrong or unreadable. A larger packing of the same model answers better.`,
    /** Behind tightLong, for a file that is close to the limit and packed very small as well. */
    coarseAlso: (packing: string) => `${packing ? `${packing} is also` : 'This is also'} a very small packing of a small model, and its answers can be wrong or unreadable.`,
    tooLargeLong: (need: string, ram: string, usable: string, size: string) =>
      `This model needs about ${need} of memory while it runs. This phone has ${ram}, and about ${usable} can go to a model. LU will not download it, so you do not lose ${size} on something that cannot start.`,
    tooLargeInstalled: (need: string, usable: string) =>
      `This model needs about ${need} of memory while it runs and this phone can give a model about ${usable}. It is on this phone, but it may not load.`,
    unknownLong: 'LU does not know the size of this file yet. It checks the size and the free storage before the download starts.',
    unknownDeviceLong: 'LU could not read how much memory this phone has, so it cannot say how well this model runs. You can still download it.',
    tightTitle: 'Close to the limit',
    tightText: 'This model is close to the limit. Other apps may be closed while it runs.',
    coarseTitle: 'Answers may be poor',
    coarseText: 'This is a very small packing of a small model. It runs on this phone, but its answers can be wrong or unreadable. A larger packing answers better.',
    tightConfirm: (size: string) => (size ? `Download ${size}` : 'Download'),
  },

  device: {
    loading: 'Reading this phone',
    line: (ram: string, usable: string, free: string) => `This phone: ${ram} memory, about ${usable} usable for a model, ${free} storage free.`,
    lineNoStorage: (ram: string, usable: string) => `This phone: ${ram} memory, about ${usable} usable for a model.`,
    short: (ram: string, free: string) => `This phone: ${ram} memory, ${free} storage free.`,
    shortNoStorage: (ram: string) => `This phone: ${ram} memory.`,
    unknown: 'LU could not read the memory of this phone. Sizes are checked before a download starts.',
    pretend: (label: string) => `Test device: ${label}`,
  },

  storageDialog: {
    title: 'Not enough storage',
    text: (name: string, need: string, free: string, missing: string) =>
      `${name} needs ${need}. This phone has ${free} free. Free up ${missing}, then start the download again.`,
    textUnknownFree: (name: string, need: string) => `${name} needs ${need} and this phone does not have that much free. Free up space, then start the download again.`,
    textResume: (name: string, need: string, free: string, missing: string) =>
      `The rest of ${name} needs ${need}. This phone has ${free} free. Free up ${missing}, then resume the download. What arrived is kept.`,
    textResumeUnknownFree: (name: string, need: string) =>
      `The rest of ${name} needs ${need} and this phone does not have that much free. Free up space, then resume the download. What arrived is kept.`,
    manage: 'Manage installed models',
    close: 'Close',
    ranOutTitle: 'Storage ran out',
    ranOut: (name: string, percent: number, missing: string) =>
      `The download of ${name} stopped at ${percent}%. What arrived is kept. Free up ${missing}, then resume the download.`,
    ranOutNoNumber: (name: string, percent: number) =>
      `The download of ${name} stopped at ${percent}%. What arrived is kept. Free up space, then resume the download.`,
    openStorage: 'Open storage',
  },

  notify: {
    title: 'Show download progress?',
    text: 'LU can show the progress of a download in a notification, so you can leave the app while a model loads. Your phone asks for permission next.',
    confirm: 'Continue',
    cancel: 'Not now',
    row: 'Download notifications',
    rowOn: 'The progress of a download shows in a notification while LU is not on the screen.',
    rowOpen: 'Off. Downloads still run while LU is not on the screen, without a notification.',
    rowRefused: 'Off. Opens the settings of your phone, where notifications for LU are turned on.',
    rowOnHint: 'Opens the settings of your phone, where notifications for LU are turned off.',
    settingsFailed: 'The settings of your phone could not be opened.',
  },
  download: {
    waiting: 'Waiting',
    running: 'Downloading',
    pausing: 'Pausing',
    paused: 'Paused',
    waitingNetwork: 'Waiting for network',
    waitingWifi: 'Waiting for Wi-Fi',
    verifying: 'Verifying',
    done: 'Installed',
    resumedAfterRestart: 'Resumed after restart',
    keptAfterRestart: 'Kept from before the restart',
    progressName: (name: string) => `Downloading ${name}`,
    sizes: (done: string, total: string) => `${done} of ${total}`,
    speed: (perSecond: string) => `${perSecond}/s`,
    eta: (time: string) => `about ${time} left`,
    interruptedTitle: 'Download interrupted',
    interrupted: (percent: number) => `Stopped at ${percent}%. The part that arrived is kept, so you will not start over.`,
    interruptedAtStart: 'The download could not start. Check the connection and try again.',
    storageTitle: 'Storage ran out',
    storage: (percent: number, missing: string) => `Storage ran out at ${percent}%. Free up ${missing} to continue.`,
    storageNoNumber: (percent: number) => `Storage ran out at ${percent}%. Free up space to continue.`,
    manageStorage: 'Manage storage',
    checksumTitle: 'File damaged',
    checksum: 'The file was damaged on the way. LU removed it.',
    downloadAgain: 'Download again',
    unreachableTitle: 'No answer',
    get unreachable() {
      return hubNamed('Hugging Face did not answer. Try again in a moment.', 'The download server did not answer. Try again in a moment.')
    },
    gatedTitle: 'Token needed',
    get gated() {
      return hubNamed('This model needs a Hugging Face token.', 'This model cannot be downloaded in this version of LU.')
    },
    addToken: 'Add token',
    goneTitle: 'File moved',
    gone: 'This file is not at its address any more. Pick another model.',
    blockedTitle: 'Download blocked',
    blocked: 'The download was sent on to an address LU does not allow, so LU stopped it and removed the part. Trying again will not help. Pick another model.',
    failedTitle: 'Download failed',
    failed: 'The download stopped. The part that arrived is kept.',
    cancelled: 'Download cancelled',
    cancelTitle: (name: string) => `Cancel the download of ${name}?`,
    cancelText: (got: string) => `The ${got} downloaded so far are removed. To keep them, pause instead.`,
    cancelTextNothing: 'Nothing was downloaded yet.',
    cancelConfirm: 'Cancel download',
    cancelKeep: 'Keep downloading',
    installedToast: (name: string) => `${name} installed`,
    alreadyThere: (name: string) => `${name} is already on this phone`,
    noFolder: 'LU could not find its model folder. Restart LU and try again.',
    startFailed: 'The download could not start. Try again in a moment.',
    offline: 'No internet. You need a connection to download a model.',
    mobileDataTitle: 'Download on mobile data?',
    mobileDataText: (size: string) => `You are not on Wi-Fi. This download is ${size} and may use your data plan.`,
    mobileDataConfirm: 'Download anyway',
    mobileDataCancel: 'Wait for Wi-Fi',
    useMobileData: 'Use mobile data',
    useMobileDataName: (name: string) => `Use mobile data for ${name}`,
    waitsForWifi: 'Waiting for Wi-Fi. The download goes on when you are connected.',
    waitsForWifiNamed: (name: string) => `${name} waits for Wi-Fi and starts when you are connected.`,
    cannotWaitForWifi: 'Not started. Tap Download again when you are on Wi-Fi.',
  },

  welcome: {
    header: 'Welcome',
    text: 'Private AI on your phone. Pick a model once, then chat without a connection. A chat with a model on this phone is not sent to any server.',
    start: 'Get started',
    account: 'I have an LU Cloud account',
    signedIn: (email: string) => `Signed in as ${email}. Continue`,
    signedInPlain: 'Signed in to LU Cloud. Continue',
    restoring: 'Restoring your chats',
  },

  setupModel: {
    title: 'Pick a starter model',
    lead: 'One small model to get you running. You can add more later in Models.',
    step: 'Step 1 of 2',
    segment: 'Kind of model',
    mainstream: 'Mainstream',
    unfiltered: 'Unfiltered',
    list: 'Starter models',
    pick: 'Pick a model',
    cardName: (name: string, size: string, fit: string) => `${name}, ${size}. ${fit}`,
    skipCloud: 'Skip, use Cloud only',
    useThis: 'Use this model',
    useThisName: (name: string) => `Use ${name}`,
    alreadyHere: 'Already on this phone',
    offline: 'No internet. You need a connection once to download a model.',
    noFit: 'No local model fits this phone. You can still use LU Cloud.',
    downloading: (name: string) => `Downloading ${name}`,
    done: (name: string) => `${name} is installed.`,
    cloudOnlyToast: 'Cloud only. You can add a model later in Models.',
  },

  setupDocs: {
    title: 'Document Chat',
    text: (size: string) => `Ask questions about your PDFs and notes. This needs one small extra model, ${size}, that stays on this phone. Optional.`,
    step: 'Step 2 of 2',
    install: (size: string) => `Install ${size}`,
    ready: 'Document Chat is ready.',
    already: 'Already installed. Document Chat is ready.',
    progress: 'Installing the document model',
    offline: 'No internet. You need a connection once to install the document model.',
  },

  setupDone: {
    title: "You're all set",
    titleLoading: 'Almost ready',
    ready: (name: string) => `${name} is ready.`,
    downloading: (name: string) => `${name} is still downloading. You can look around now. Chatting on this phone starts when it is done.`,
    paused: (name: string) => `The download of ${name} is paused. Resume it here or later in Models.`,
    failed: (name: string) => `The download of ${name} stopped.`,
    none: 'No model yet. Install one in Models.',
    cloud: 'LU Cloud is ready. You can add a model for this phone later in Models.',
    start: 'Start chatting',
    openModels: 'Open Models',
  },

  models: {
    title: 'Models',
    downloads: 'Downloads',
    downloadsWord: 'active',
    badge: (count: number) => (count === 1 ? '1 download running' : `${count} downloads running`),
    segment: 'Models view',
    getNew: 'Get new',
    installed: 'Installed',
    search: 'Search Hugging Face',
    searchShort: 'Search',
    searchHint: 'Finds models on Hugging Face in the file format LU runs.',
    filters: 'Filters',
    filterFits: 'Fits this phone',
    filterMainstream: 'Mainstream',
    filterUnfiltered: 'Unfiltered',
    filterVision: 'Vision',
    visionWishTitle: 'No model in this list reads images',
    visionWish: 'The models below answer text. For photos and pictures, pick an LU Cloud model in the chat.',
    visionWishOk: 'Got it',
    smallNote: 'Models that fit a phone are small. For long or tricky tasks LU Cloud is stronger.',
    offlineTitle: 'No internet',
    offline: 'The list of models needs a connection. Installed models still work, and a download picks up where it stopped.',
    searching: 'Searching Hugging Face',
    searchEmptyTitle: 'No model found',
    searchEmpty: (query: string) => `No model LU can run matches ${query}.`,
    clearSearch: 'Clear search',
    searchResults: 'From Hugging Face',
    filterEmptyTitle: 'Nothing matches',
    filterEmpty: 'No model matches these filters.',
    showAll: 'Show all models',
    emptyTitle: 'No model on this phone yet.',
    empty: 'Pick a small model and LU works without a connection.',
    open: (name: string) => `Open ${name}`,
    useInChat: 'Use in chat',
    useInChatName: (name: string) => `Use ${name} in chat`,
    chatModel: 'Chat model',
    nowChatModel: (name: string) => `${name} is now the chat model`,
    /** The one action of that toast: a new chat with the model that was just chosen. */
    openNewChat: 'New chat',
    /** Under a card whose "Use in chat" was tapped while another model was loading. */
    loadsAfter: (name: string) => (name ? `Loads after ${name}` : 'Loads next'),
    /** On the card of a catalogue model whose other packing is on this phone (G11). */
    installedPacking: (packing: string, size: string, more: number) => `Installed: ${packing}, ${size}${more > 0 ? ` and ${more} more` : ''}`,
    /** The listed file and other packings of the model are on the phone: "Installed: Q4_K_M and IQ2_M". */
    installedPackings: (listed: string, others: readonly string[]) => {
      const named = others.slice(0, 2)
      const rest = others.length - named.length
      if (rest > 0) return `Installed: ${[listed, ...named].join(', ')} and ${rest} more`
      return `Installed: ${[listed, ...named.slice(0, -1)].join(', ')} and ${named[named.length - 1]}`
    },
    /** Above the bar of a packing that is on its way, on the card of its catalogue model. */
    packingOnItsWay: (packing: string) => `Downloading ${packing}`,
    /** Under a card whose buttons wait because the engine is busy with another model. */
    engineBusy: (name: string) => (name ? `Loading ${name}` : 'Unloading the current model'),
    load: 'Load',
    loadName: (name: string) => `Load ${name}`,
    unload: 'Unload',
    unloadName: (name: string) => `Unload ${name}`,
    loading: (name: string) => `Loading ${name}`,
    loadedToast: (name: string) => `${name} is loaded`,
    unloadedToast: 'Model unloaded',
    tools: 'Tools',
    tagTools: 'Tools',
    // The word of the measured mark, written once in lib/unfiltered-mark.ts.
    tagNoFilter: UNFILTERED_MARK_LABEL,
    tagVision: 'Vision',
    tagThinking: 'Thinking',
    // The reason is the test, not the size: models of the same size that passed it carry no note (r6 Nachpruefung Android, N12).
    weakNote: 'Did not answer a plain request in our test.',
    weakDetail: 'In our test this model did not answer a plain request properly. Pick another model if this phone can run one.',
    thinkingNote: 'Can think before it answers. The chat shows the reasoning as its own block, apart from the answer. Thinking is switched on and off in the chat options.',
    benchmark: 'Benchmark',
    benchmarkSub: 'Measure speed on this phone',
    cleanup: 'Clean up partial downloads',
    cleanupNone: 'Nothing to clean',
    cleanupSize: (count: number, size: string) => (count === 1 ? `1 partial file, ${size}` : `${count} partial files, ${size}`),
    cleanupTitle: 'Delete partial downloads?',
    cleanupText: (size: string) => `This frees ${size}. Downloads that were paused start over.`,
    cleanupConfirm: 'Delete',
    cleanupDone: (size: string) => `Freed ${size}`,
    storageCard: 'Model storage',
    storageUsed: (used: string) => `${used} used`,
    storageFree: (free: string) => `${free} free`,
    storageOpen: 'Model storage. Open storage and downloads',
    notOffered: 'This model is not available in this version of LU.',
    notOfferedInstalled: 'This model is not offered in this version of LU any more. The copy on this phone keeps working.',
    documentModel: 'Document model',
  },

  detail: {
    fallbackTitle: 'Model',
    notFoundTitle: 'Model not found',
    notFound: 'This model is not in the list any more.',
    backToModels: 'Back to Models',
    variants: 'Variants',
    variantName: (quant: string, size: string) => (size ? `${quant}, ${size}` : quant),
    variantsHint: 'A variant is the same model, packed more or less tightly. A smaller file needs less memory and answers a little less exactly. Q4_K_M is the usual middle.',
    abliterated: '"Abliterated" means the refusals were taken out of the model after its training. It answers what the original would decline.',
    variantsLoading: 'Reading the files of this model',
    variantsFailed: 'LU could not read the files of this model. Check your connection.',
    noGguf: 'This repository has no file LU can run. LU needs a model in the GGUF format.',
    sharded: 'This model comes in several parts. The engine on this phone loads single files only.',
    stillOffline: 'Still no internet.',
    useInChat: 'Use in chat',
    isChatModel: 'This is the chat model',
    load: 'Load now',
    unload: 'Unload',
    delete: 'Delete model',
    deleteTitle: (name: string) => `Delete ${name}?`,
    deleteText: (size: string) => `This frees ${size} on this phone. You can download it again later.`,
    /** A file LU has no address for (brought in from a file on this phone): it cannot be downloaded again. */
    deleteTextImported: (size: string) => `This frees ${size} on this phone. You brought this file in yourself, LU cannot download it again.`,
    deleteTextLoaded: (size: string) => `This model is loaded right now. LU unloads it first. This frees ${size} on this phone.`,
    deleteConfirm: 'Delete',
    deleted: (name: string, size: string) => `Deleted ${name}. Freed ${size}.`,
    deleteFailed: 'LU could not delete this model.',
    benchmark: 'Run benchmark',
    viewHf: 'View on Hugging Face',
    viewHfOpens: 'Opens huggingface.co in your browser',
    openFailed: 'Could not open the browser.',
    smaller: 'Pick a smaller model',
    cloud: 'Use it on LU Cloud',
    details: 'Details',
    fileSize: 'File size',
    memory: 'Memory needed',
    memoryValue: (need: string) => `About ${need}`,
    context: 'Context window',
    contextLoaded: (ctx: string) => `${ctx} on this phone`,
    contextPlanned: (ctx: string) => `Up to ${ctx} on this phone`,
    vision: 'Vision',
    visionNo: 'Text only on this phone',
    source: 'Source',
    /** Under the source of a file that is another build of a catalogue model. */
    sourceOfModel: 'The repository of this model. This file is another build of it.',
    license: 'License',
    checksum: 'Checksum',
    checksumVerified: 'Verified',
    checksumOnDownload: 'Checked while downloading',
    checksumNone: 'Not listed by the source',
    unknown: 'Unknown',
    sizeUnknown: 'Unknown until the download starts',
  },

  downloads: {
    title: 'Downloads',
    emptyTitle: 'No downloads',
    empty: 'Models you download show up here.',
    getNew: 'Get new models',
    footer: 'Downloads keep running when you leave LU and pick up again after a restart.',
    open: (name: string) => `Open ${name}`,
    list: 'Downloads',
  },

  benchmark: {
    title: 'Benchmark',
    pick: 'Model to measure',
    emptyTitle: 'No model to measure',
    empty: 'Install a model first, then measure it here.',
    getNew: 'Get new models',
    run: 'Run benchmark',
    stop: 'Stop',
    running: (step: number, total: number) => `Running test ${step} of ${total}`,
    starting: 'Starting',
    keepOpen: 'Keep LU open',
    willLoad: (name: string) => `${name} is not loaded. LU loads it first, which unloads the current model.`,
    loading: (name: string) => `Loading ${name}`,
    results: 'Results',
    measured: 'Measured on this phone',
    noResults: 'No results yet.',
    speed: (tps: string) => `${tps} tokens per second`,
    accuracy: (right: number, total: number) => `${right} of ${total} answers right`,
    rowName: (name: string) => `Results for ${name}`,
    test: (name: string) => name,
    testLine: (tps: string, first: string, right: boolean | null) =>
      `${tps} tokens per second, first word after ${first}${right === null ? '' : right ? ', right' : ', wrong'}`,
    clear: 'Clear results',
    clearTitle: 'Clear all results?',
    clearText: 'The measurements of every model are removed.',
    clearConfirm: 'Clear',
    cleared: 'Results cleared',
    failed: 'The benchmark stopped.',
    loadFailed: (name: string) => `${name} could not be loaded, so nothing was measured.`,
  },

  engine: {
    title: 'On device engine',
    status: 'Status',
    none: 'No model loaded',
    noneText: 'Load a model in Models, or send a message. LU loads the chat model by itself.',
    openModels: 'Open Models',
    running: 'Running',
    starting: 'Starting',
    notAnswering: 'Loaded, not answering yet',
    model: 'Model',
    accelerator: 'Runs on',
    acceleratorGpu: 'Graphics acceleration',
    acceleratorCpu: 'Processor',
    acceleratorUnknown: 'Not reported',
    context: 'Context window',
    contextValue: (ctx: string) => `${ctx} tokens`,
    unload: 'Unload model',
    restart: 'Restart engine',
    // An answer is being written by the model on this phone: restarting cuts it (acceptance iPhone, second part, P3).
    restartAnsweringTitle: 'Restart while an answer is being written?',
    restartAnsweringText: 'The model on this phone is answering right now. Restarting the engine stops that answer. The part that arrived stays in the chat.',
    restartAnsweringConfirm: 'Restart',
    restartAnsweringCancel: 'Let it finish',
    restarted: 'Engine restarted',
    settingsApplied: 'The engine now runs with the new settings',
    restartFailed: 'The engine could not restart.',
    selfTest: 'Run self test',
    selfTestRunning: 'Asking the model a short question',
    selfTestOk: (ms: string, tps: string) => `The engine answers. First word after ${ms}, ${tps} tokens per second.`,
    selfTestOkPlain: 'The engine answers.',
    selfTestFail: 'The engine did not answer the test.',
    selfTestNoModel: 'Load a model first, then run the self test.',
    contextSegment: 'Context',
    contextAuto: 'Auto',
    contextHint: (max: string) => `More context remembers more of a chat and needs more memory. This phone carries up to ${max} with this model.`,
    contextHintNone: 'More context remembers more of a chat and needs more memory.',
    contextApplied: (ctx: string) => `The engine now runs with ${ctx}`,
    contextSaved: 'Saved. It applies the next time a model loads.',
    gpu: 'Use graphics acceleration',
    gpuSub: 'Faster where the phone supports it. LU falls back to the processor by itself.',
    threads: 'Threads',
    threadsSub: (max: number) => `Processor threads for answers. 0 lets LU choose. This phone has ${max} ${max === 1 ? 'core' : 'cores'}, more threads than that do not help.`,
    noGraphics: 'This phone computes on the processor. On Android, LU runs models without graphics acceleration.',
    background: 'Unload when LU is in the background',
    backgroundSub: 'Frees memory for other apps. The model loads again when you come back and send a message.',
    advanced: 'Advanced',
    advancedSub: 'Layers, flash attention, cache types',
    advancedSubNoGraphics: 'Flash attention, cache types',
    advancedLead: 'These settings change how the model is loaded. A change loads the model again, which takes a moment.',
    reset: 'Reset engine settings',
    resetTitle: 'Reset engine settings?',
    resetText: 'Context, acceleration and the advanced values go back to their defaults. Your models stay.',
    resetConfirm: 'Reset',
    resetDone: 'Engine settings reset',
    advancedTitle: 'Advanced',
    flash: 'Flash attention',
    flashAuto: 'Auto',
    flashOn: 'On',
    flashOff: 'Off',
    flashSub: 'Auto lets the engine decide. An 8 bit cache for values needs flash attention.',
    cacheK: 'Cache type for keys',
    cacheV: 'Cache type for values',
    cacheSub: 'f16 is the standard. q8_0 keeps what the model remembers of a chat in 8 bit instead of 16. That needs less memory and runs a little slower.',
    cacheSubFlashOff: 'With flash attention off, the values stay at f16 and only the keys use q8_0.',
    layers: 'Layers on the graphics chip',
    layersAll: 'All',
    layersSub: '0 runs everything on the processor. The highest value means all layers.',
    settings: 'Settings',
    actions: 'Actions',
    tuningNoteAction: 'Open Advanced',
  },

  notices: {
    loading: (name: string) => `Loading ${name}`,
    cpu: 'Graphics acceleration is not available. LU is running on the processor, which is slower.',
    details: 'Details',
    unloaded: 'The model was unloaded to free memory.',
    loadAgain: 'Load again',
    failed: 'The model could not start.',
    failedName: (name: string) => `${name} could not start.`,
    noMemory: (name: string) => `Not enough free memory to load ${name} right now.`,
    fileGone: 'The file of this model is not on this phone any more. Download it again in Models.',
    pickAnother: 'Pick another model',
    /** The same button where room is cramped (a phone on its side at a large text): a part of the whole label, so its name stays. */
    pickAnotherShort: 'Pick another',
    tryAgain: 'Try again',
    dismiss: 'Dismiss',
    memoryWarning: 'This phone is low on memory. LU may unload the model.',
  },

  storage: {
    title: 'Storage and downloads',
    bar: 'Storage on this phone',
    models: 'Models',
    chats: 'Chats and files',
    free: 'Free',
    barName: (models: string, chats: string, free: string) => `Models ${models}, chats and files ${chats}, free ${free}`,
    unknownFree: 'Unknown',
    installed: 'Installed models',
    none: 'No model on this phone yet.',
    delete: 'Delete',
    deleteName: (name: string) => `Delete ${name}`,
    cleanup: 'Clean up partial downloads',
    importFile: 'Import a model file',
    importFileSub: 'Copy a GGUF file from this phone into LU.',
    importCopying: (name: string) => `Copying ${name}`,
    importCancel: 'Cancel',
    importDone: (name: string) => `${name} is in your models now.`,
    importCancelled: 'Import cancelled',
    importFailedTitle: 'The file was not imported',
    importFailed: 'The file could not be imported. Try again.',
    importUnavailable: 'LU cannot import a file on this phone.',
    speedLimit: 'Download speed limit',
    speedOff: 'Off',
    speedValue: (mb: number) => `${mb} MB/s`,
    speedSet: (text: string) => `Speed limit: ${text}`,
    speedFailed: 'The speed limit could not be set.',
    wifiOnly: 'Download on Wi-Fi only',
    wifiOnlySub: 'Downloads wait for Wi-Fi. LU asks before one uses mobile data.',
    token: 'Hugging Face token',
    tokenHint: 'Only needed for models that ask you to sign in at Hugging Face. Stored on this phone.',
    tokenSave: 'Save token',
    tokenRemove: 'Remove token',
    tokenSaved: 'Token saved',
    tokenRemoved: 'Token removed',
    tokenStored: 'A token is stored on this phone.',
    tokenFailed: 'This phone could not store the token.',
    clearCache: 'Clear cached results',
    clearCacheSub: 'Removes saved previews. Your gallery and chats stay.',
    cacheCleared: (size: string) => `Cache cleared. Freed ${size}.`,
    cacheClearedPlain: 'Cache cleared',
    cacheEmpty: 'Nothing was cached',
    downloads: 'Downloads',
    openDownloads: 'Open downloads',
    lowTitle: 'Storage is almost full',
    low: (free: string) => `Only ${free} are free. Delete a model you do not use to make room.`,
  },
} as const

export type ModelsStrings = typeof MODELS_STRINGS