johnnydevriese's picture
Add files using upload-large-folder tool
173d905 verified
metadata
license: mit
license_link: https://huggingface.co/microsoft/Phi-4-mini-instruct/resolve/main/LICENSE
language:
  - multilingual
  - ar
  - zh
  - cs
  - da
  - nl
  - en
  - fi
  - fr
  - de
  - he
  - hu
  - it
  - ja
  - ko
  - 'no'
  - pl
  - pt
  - ru
  - es
  - sv
  - th
  - tr
  - uk
pipeline_tag: text-generation
tags:
  - nlp
  - code
  - mlx
widget:
  - messages:
      - role: user
        content: Can you provide ways to eat combinations of bananas and dragonfruits?
library_name: transformers
base_model: microsoft/Phi-4-mini-instruct

johnnydevriese/phi-4-mini-instruct-4bit

The Model johnnydevriese/phi-4-mini-instruct-4bit was converted to MLX format from microsoft/Phi-4-mini-instruct using mlx-lm version 0.21.5.

Use with mlx

pip install mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("johnnydevriese/phi-4-mini-instruct-4bit")

prompt = "hello"

if tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)