mxmcc's picture
Upload README.md with huggingface_hub
ee56c9a verified
metadata
license: cc-by-nc-4.0
datasets:
  - Salesforce/APIGen-MT-5k
  - Salesforce/xlam-function-calling-60k
language:
  - en
pipeline_tag: text-generation
tags:
  - function-calling
  - LLM Agent
  - tool-use
  - llama
  - qwen
  - pytorch
  - LLaMA-factory
  - mlx
  - mlx-my-repo
library_name: transformers
base_model: Salesforce/Llama-xLAM-2-8b-fc-r

mxmcc/Llama-xLAM-2-8b-fc-r-mlx-8Bit

The Model mxmcc/Llama-xLAM-2-8b-fc-r-mlx-8Bit was converted to MLX format from Salesforce/Llama-xLAM-2-8b-fc-r using mlx-lm version 0.22.3.

Use with mlx

pip install mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("mxmcc/Llama-xLAM-2-8b-fc-r-mlx-8Bit")

prompt="hello"

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

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