Text Generation
Transformers
Safetensors
English
minimind
minimax_m2
conversational
custom_code
fp8
max2
Mixture of Experts
mixture-of-experts
gqa
grouped-query-attention
edge-deployment
mobile
android
efficient
llama-cpp
causal-lm
Eval Results (legacy)
Instructions to use fariasultana/MiniMind with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fariasultana/MiniMind with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fariasultana/MiniMind", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("fariasultana/MiniMind", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fariasultana/MiniMind with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fariasultana/MiniMind" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fariasultana/MiniMind", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fariasultana/MiniMind
- SGLang
How to use fariasultana/MiniMind with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "fariasultana/MiniMind" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fariasultana/MiniMind", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "fariasultana/MiniMind" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fariasultana/MiniMind", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use fariasultana/MiniMind with Docker Model Runner:
docker model run hf.co/fariasultana/MiniMind
| #!/usr/bin/env python3 | |
| """ | |
| MiniMind (Mind2) - Setup Script | |
| Lightweight language models for edge deployment. | |
| """ | |
| from setuptools import setup, find_packages | |
| from pathlib import Path | |
| # Read README | |
| readme_path = Path(__file__).parent / "README.md" | |
| long_description = readme_path.read_text(encoding="utf-8") if readme_path.exists() else "" | |
| # Read requirements | |
| req_path = Path(__file__).parent / "requirements.txt" | |
| requirements = [] | |
| if req_path.exists(): | |
| requirements = [ | |
| line.strip() for line in req_path.read_text().splitlines() | |
| if line.strip() and not line.startswith("#") | |
| ] | |
| setup( | |
| name="minimind", | |
| version="1.0.0", | |
| author="Matrix Agent", | |
| author_email="contact@minimind.ai", | |
| description="MiniMind (Mind2) - Lightweight language models for edge deployment", | |
| long_description=long_description, | |
| long_description_content_type="text/markdown", | |
| url="https://github.com/minimind/minimind", | |
| project_urls={ | |
| "Documentation": "https://github.com/minimind/minimind#readme", | |
| "Bug Tracker": "https://github.com/minimind/minimind/issues", | |
| }, | |
| packages=find_packages(exclude=["tests", "tests.*", "android", "android.*"]), | |
| classifiers=[ | |
| "Development Status :: 4 - Beta", | |
| "Intended Audience :: Developers", | |
| "Intended Audience :: Science/Research", | |
| "License :: OSI Approved :: Apache Software License", | |
| "Operating System :: OS Independent", | |
| "Programming Language :: Python :: 3", | |
| "Programming Language :: Python :: 3.9", | |
| "Programming Language :: Python :: 3.10", | |
| "Programming Language :: Python :: 3.11", | |
| "Programming Language :: Python :: 3.12", | |
| "Topic :: Scientific/Engineering :: Artificial Intelligence", | |
| ], | |
| python_requires=">=3.9", | |
| install_requires=[ | |
| "torch>=2.1.0", | |
| "numpy>=1.24.0", | |
| ], | |
| extras_require={ | |
| "train": [ | |
| "transformers>=4.35.0", | |
| "datasets>=2.14.0", | |
| "accelerate>=0.24.0", | |
| "wandb>=0.15.0", | |
| ], | |
| "export": [ | |
| "onnx>=1.14.0", | |
| "onnxruntime>=1.16.0", | |
| ], | |
| "dev": [ | |
| "pytest>=7.4.0", | |
| "black>=23.0.0", | |
| "isort>=5.12.0", | |
| "mypy>=1.5.0", | |
| ], | |
| "all": [ | |
| "transformers>=4.35.0", | |
| "datasets>=2.14.0", | |
| "accelerate>=0.24.0", | |
| "wandb>=0.15.0", | |
| "onnx>=1.14.0", | |
| "onnxruntime>=1.16.0", | |
| "pytest>=7.4.0", | |
| "black>=23.0.0", | |
| ], | |
| }, | |
| entry_points={ | |
| "console_scripts": [ | |
| "minimind-train=scripts.train:main", | |
| "minimind-export=scripts.export:main", | |
| ], | |
| }, | |
| include_package_data=True, | |
| zip_safe=False, | |
| ) | |