Skip to main content

phi2-mps

image

An opinionated CLI to use Microsoft Phi-2 Model on your macOS!

You should have at least 8GB of memory to run this SLM on Apple silicon

Start

Install phi2-mps with pip:

pip install phi2-mps

Download Phi-2 Model with this url:

# this may take a while,cause the model size is about 5.18G
wget https://huggingface.co/AlexWuKing/atomgradient_models/resolve/main/weights.npz

Run inference from any path on your computer:

# [weights.npz] should be the download path of the model file
phi2-mps --model weights.npz --prompt "Hi how are you" --max_tokens 256
image

CLI Options

The whisper-mps repo provides an all round support for running Whisper in various settings. More command-line support will be provided later

  --model MODEL-PATH
                Local model file path where you put the weights file
  --prompt PROMPT
                The prompt will send to model to gen tokens    
  --max_tokens MAX-TOKEN
                The Total number of tokens will be replied to you

WE ARE HIRING

refer here: https://daxiang.feishu.cn/docx/LluCd7J38o9U5pxN3kdcpSh6nEh

Metadata

Release files for phi2_mps 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phi2_mps 0.0.4
File Size Uploaded
phi2_mps-0.0.4.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phi2_mps 0.0.4
File Interpreter ABI Platform
phi2_mps-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / phi2_mps-0.0.4.tar.gz

Download URL phi2_mps-0.0.4.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
99779c7352e9b210fa1784b27e8cf6de2f5930bf4f3b1284cfe8fb7e8f0d1b5c
BLAKE2b-256 checksum
How to use checksums
09e50bd262153faf6ce2d033ce76a935a28a415780658bcac4be1f299c645324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.11.0 CPython/3.12.0

Release files / phi2_mps-0.0.4-py3-none-any.whl

Download URL phi2_mps-0.0.4-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4aead08faa56b1f5d06b6e8cd7d6558633c5982b60554d825e3cbb5b2bfdc0d
BLAKE2b-256 checksum
How to use checksums
152bfebfa19898ea2d2af39ccda632fefc118c72abf498ff5088f864a56bf849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.11.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page