jan icon indicating copy to clipboard operation
jan copied to clipboard

epic: Users can import model binaries via Jan UI

Open freelerobot opened this issue 1 year ago • 3 comments

Motivation

Address the top user complaint by streamlining the model import process in Jan. Current formats and approaches hinder user experience, especially for non-technical users.

Goals and Success Criteria

2.1. Goals

  • Enhance user experience by simplifying the model import process.
  • Alleviate the number one user complaint regarding model import.

2.2.Success Criteria

  • Enable users to seamlessly import models through clicking to add or drag-and-drop functionality.
  • Provide flexibility for users to import models from both folders and individual files.
  • Allow users to customize default configurations through an autogenerated model.json file.
  • Utilize symlinks to prevent the models folder from occupying excessive user storage space.

User Flow

1. Import Model via GUI:

  1. Initiate Import: Access the "Import Model" feature through the Jan application interface whether clicking to add or drag and drop a model file or folder into the application window.

  2. Automatic Scan (Folder Import): (in case users import a folder) If a folder is dropped, Jan automatically scans for multiple model files (GGUF format).

  3. Choose Import Method:

    • Prompt users to choose their preferred import method:
      • a. Duplicate Folder:
        • If users want to maintain a separate model folder within Jan (may consume additional storage).
      • b. Use Symlinks:
        • If users want to avoid duplicating the model folder to save storage (requires understanding symlinks).
  4. Importing model: Users are presented with an import interface, showing progress, cancel, and remove file options.

  5. Autogenerated model.json (Folder Import): For each model found, Jan generates a corresponding model.json in Jan Data Folder.

  6. Optional Model Configuration: Users have the option to fill in additional properties in the model.json for more detailed configurations.

2. Import Model Manually

  • For users who manually add models located at specific paths (for example: User opts to add only the model located at /random_path/model to Jan), Jan won't automatically scan these models every time you open the app.

  • For this case: Users need to use the "Refresh" button to manually re-scan and integrate any models they have manually added outside of the automatic scanning process.

6. Design

Figma link: https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=2160-165286&mode=design&t=TdZv1LIEiCArXNOZ-4

Image

Tasklist

Design

  • [x] #1542

Implementation

  • [ ] #1735
  • [ ] #1541
  • [x] #1381

Further questions:

  • Clearly articulate how default values in the model.json fields will be handled.
  • Determine whether the app necessitates a restart after the model binary is relocated into /models.

Out-of-scope

  • Only support GGUF format for now, other model file format Jan won't support.
  • Import model via Huggingface URL

freelerobot avatar Dec 27 '23 05:12 freelerobot

For review: Import models via GUI: https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=2160-165286&mode=design&t=frUQsREQGVbBH5uL-4

hantran-co avatar Jan 11 '24 12:01 hantran-co

Archive Nicole's original comment:


Problem

  • See #1227

Success Criteria

  1. Users can drag and drop a model binary
  2. Users can confirm directly (without step 3)
  3. Optionally: Users have the option of filling in the other properties in the model.json

Specs

  • TODO: define field defaulting behavior
  • Define folder creation & path behavior
  • Figure out if app needs to restart after model binary is moved into /models @louis-jan ?

Designs:

  • https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=870-53032&mode=design&t=tbs2MGOMJcc35a1T-0

Additional context Add any other context or screenshots about the feature request here.

hantran-co avatar Jan 18 '24 09:01 hantran-co

Remove huggingface...

hantran-co avatar Jan 25 '24 07:01 hantran-co

@Van-QA , please help to validate this issue. Thank you!

namchuai avatar Feb 26 '24 09:02 namchuai

Tested and looking good on Jan 0.4.7-304 ✅

Van-QA avatar Mar 11 '24 03:03 Van-QA