CoolFace
Apppublic

fariasultana/MiniMind-API

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
0likes
App README

๐Ÿง  MiniMind Max2 API

Tiny Model, Powerful Experience - An efficient language model API with FastAPI backend.

Features

  • โ€”Mixture of Experts (MoE): Only 25% of parameters activated per token
  • โ€”Grouped Query Attention: 4:1 ratio for memory efficiency
  • โ€”FastAPI Backend: RESTful API with automatic docs
  • โ€”Gradio Interface: Interactive UI for testing

API Endpoints

EndpointMethodDescription
/docsGETSwagger UI documentation
/generatePOSTGenerate text from prompt
/model-infoGETGet model architecture info
/healthGETHealth check
/gradioGETInteractive Gradio interface

Example Usage

python
import requests

response = requests.post(
    "https://your-space.hf.space/generate",
    json={
        "prompt": "Once upon a time",
        "max_new_tokens": 100,
        "temperature": 0.8
    }
)
print(response.json()["generated_text"])

Model Variants

ModelTotal ParamsActive ParamsTarget
max2-nano500M125MIoT, Mobile
max2-lite1.5B375MMobile, Tablet
max2-pro3B750MDesktop

License

Apache 2.0