ChatBotOpenAi / README.md
VicGerardoPR's picture
Update README.md
167a2cb verified
|
raw
history blame
1.15 kB
metadata
tags:
  - text-generation
  - conversational
  - llama
license: mit
library_name: transformers
pipeline_tag: text-generation

Chatbot Phi-3-mini Optimizado para Mac M1/M2

Modelo de chatbot optimizado para Apple Silicon basado en Microsoft Phi-3-mini-4k-instruct (3.8B parámetros) con quantización 4-bit.

Chatbot Demo

Model Details

Características Clave

  • Arquitectura: Transformer-based (Llama-like)
  • Context Window: 4K tokens
  • Quantización: 4-bit (bnb)
  • Hardware Target: Apple M1/M2/M3 (GPU Metal)
  • Framework: PyTorch 2.3+ con MPS

Uso Previsto

  • Asistente conversacional general
  • Generación de texto en español/inglés
  • Q&A contextual

How to Use

Inferencia Directa

from transformers import pipeline

chatbot = pipeline(
    "text-generation",
    model="microsoft/Phi-3-mini-4k-instruct",
    device_map="auto",
    torch_dtype="auto",
    trust_remote_code=True
)

messages = [{"role": "user", "content": "Explica la teoría de relatividad"}]
response = chatbot(messages, max_new_tokens=256)
print(response[0]['generated_text'])