Narsil / hf-chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hf-chat

hf-chat leverages huggingface/chat-ui and huggingface/candle to create native and efficient chat apps for macOS and iOS. It uses tauri as the cross-platform middleware.

This is Microsoft Phi 1.5, unquantized, running locally on iPhone 15 Pro Max using Metal Performance Shaders (MPS) for acceleration:

Phi 1.5 running locally on iOS

Build for iOS

  1. Please, make sure you have Xcode installed with support for iOS development.

  2. Install dependencies and the cargo tauri CLI.

$ pnpm install
$ cargo install tauri-cli --version=2.0.0-alpha.20
  1. Change the app identifier and development team in src-tauri/tauri.conf.json. These are the default values that you'll need to replace:
      "identifier": "co.huggingface.hfchat",
      "iOS": {
          "developmentTeam": "2EADP68M95"
      },

You can create an app identifier from Apple's developer site visiting this link. To find your development team ID, select "Membership details" after you log in to the developer site.

  1. Generate the Xcode project files.
$ cargo tauri ios init

This will place the auto-generated files in src-tauri/gen/.

  1. Run on device or a simulator. If you have an iPhone attached, it should be automatically detected. Otherwise, you'll be shown a menu to select an iOS simulator among the ones installed in your system.
cargo tauri ios dev
  1. To generate an IPA archive suitable for deployment, replace the last command with:
cargo tauri ios build

About


Languages

Language:TypeScript 34.3%Language:Rust 33.2%Language:Svelte 29.6%Language:HTML 1.4%Language:JavaScript 0.9%Language:Shell 0.4%Language:CSS 0.2%