1. 10 Mar, 2025 1 commit
    • Jesse Gross's avatar
      model: Update encoder cache to use multimodal input processing handler · a1cda80b
      Jesse Gross authored
      The encoder cache needs to know the position of images in the input
      stream so that it knows when to delete them. Previously images didn't
      have a position, so we implied one by breaking batches before an
      image and then assuming the image was in the first position. However,
      multimodal objects are now given explicit positions in the input
      stream, so we can use that instead.
      
      Breaking batches was also a way to simulate a cross attention mask
      for mllama. However, given that it only supports a single sequence
      and a single image, this mask doesn't serve any real purpose.
      Removing the batch break does not appear to affect the quality of
      the output.
      
      Most of this is simply moving the input data structures to a new
      package to avoid import cycles.
      a1cda80b
  2. 09 Mar, 2025 1 commit
  3. 08 Mar, 2025 5 commits
  4. 07 Mar, 2025 18 commits
  5. 05 Mar, 2025 2 commits
    • Blake Mizerany's avatar
      server/internal/registry: take over pulls from server package (#9485) · e2252d0f
      Blake Mizerany authored
      This commit replaces the old pull implementation in the server package
      with the new, faster, more robust pull implementation in the registry
      package.
      
      The new endpoint, and now the remove endpoint too, are behind the
      feature gate "client2" enabled only by setting the OLLAMA_EXPERIMENT
      environment variable include "client2".
      
      Currently, the progress indication is wired to perform the same as the
      previous implementation to avoid making changes to the CLI, and because
      the status reports happen at the start of the download, and the end of
      the write to disk, the progress indication is not as smooth as it could
      be. This is a known issue and will be addressed in a future change.
      
      This implementation may be ~0.5-1.0% slower in rare cases, depending on
      network and disk speed, but is generally MUCH faster and more robust
      than the its predecessor in all other cases.
      e2252d0f
    • Daniel Hiltgen's avatar
      Win: doc new rocm zip file (#9367) · cae5d4d4
      Daniel Hiltgen authored
      To stay under the 2G github artifact limit, we're splitting ROCm
      out like we do on linux.
      cae5d4d4
  6. 04 Mar, 2025 6 commits
    • Michael Yang's avatar
      ml/backend/ggml: consolidate system info logging · 05a01fde
      Michael Yang authored
      - output backend system info when initializing the backend. this ensures
        this information is always present without needing to be called
        explicitly
      - convert to structured logging
      - enumerate devices rather than backends since devices are ordered
      - track device indices grouped by device name
      05a01fde
    • aritra saha's avatar
      docs: add granite-3.2 to the readme · 8fe6f69f
      aritra saha authored
      8fe6f69f
    • Daniel Hiltgen's avatar
      New engine: vision models and auto-fallback (#9113) · 1fdb351c
      Daniel Hiltgen authored
      * Include unified vision layers in memory prediction
      
      For newer vision models with a single gguf, include
      the projection estimates.
      
      * Adjust CLI to handle both styles of vision model metadata
      
      * Wire up new tokenizers for new engine
      
      If we're loading the new engine, utilize the new model
      text processor instead of calling into cgo wrappers for
      llama.cpp.  This also cleans up some tech debt from the
      older tokenization flow for the C++ server which was
      no longer used.
      
      This also adjusts the grammar handling logic to pass
      through to the new engine instead of utilizing the cgo
      schema to grammar call.
      
      * Lay foundation for auto selection of new engine
      1fdb351c
    • Blake Mizerany's avatar
      server/internal/registry: reintroduce pruning on model deletion (#9489) · 7a01ad76
      Blake Mizerany authored
      This reintroduces aggressive pruning on model deletion as a temporary
      measure until a more controlled garbage collection (GC) mechanism is
      implemented.
      
      Issues with the current approach:
      
      1. Users may accidentally delete a model (`ollama rm llama3.3` instead
         of `ollama rm llama3.2`), requiring a full re-download unless another
         model references the same blobs.
      
      2. Users may assume a deleted model is still referenced elsewhere, but
         due to prior updates or deletions, the references no longer exist,
         leading to unnecessary re-downloads.
      
      Soon, we should implement a structured GC mechanism to retain
      unreferenced blobs for a configurable period before removal, which will
      run on "ollama rm" and other commands we deem appropriate.
      
      Users that want to immediately remove unreferenced blobs can use a new
      prune command that will allow them to specify the age and class of blobs
      to remove.
      
      Example usage:
      
          # Run basic blob GC
          $ ollama prune
      
          # Remove unreferenced blobs older than 7 days
          $ ollama prune --age 7d
      
          # Remove all blobs, referenced or not, older than 7 days (and their manifests?)
          $ ollama prune --age 7d --all
      
          # Remove all unreferenced blobs immediately
          $ ollama prune --age 0 --all
      
          # Remove all blobs
          $ ollama prune --age 0 --all
      
      This should provide a safer and more predictable cleanup process.
      7a01ad76
    • Blake Mizerany's avatar
      server/.../backoff,syncs: don't break builds without synctest (#9484) · 55ab9f37
      Blake Mizerany authored
      Previously, developers without the synctest experiment enabled would see
      build failures when running tests in some server/internal/internal
      packages using the synctest package. This change makes the transition to
      use of the package less painful but guards the use of the synctest
      package with build tags.
      
      synctest is enabled in CI. If a new change will break a synctest
      package, it will break in CI, even if it does not break locally.
      
      The developer docs have been updated to help with any confusion about
      why package tests pass locally but fail in CI.
      55ab9f37
    • KindBrave's avatar
      fefbf8f7
  7. 03 Mar, 2025 7 commits