Instructions to use masahiroid/Sentiment-Analysis-7B-4bit-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use masahiroid/Sentiment-Analysis-7B-4bit-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("masahiroid/Sentiment-Analysis-7B-4bit-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use masahiroid/Sentiment-Analysis-7B-4bit-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "masahiroid/Sentiment-Analysis-7B-4bit-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "masahiroid/Sentiment-Analysis-7B-4bit-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masahiroid/Sentiment-Analysis-7B-4bit-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Sentiment-Analysis-7B-4bit-mlx
microsoft/Sentiment-Analysis-7B を Apple Silicon 向けに MLX の 4bit(group size 64)へ量子化した非公式の変換版です。M2 16GB クラスの Mac(GPU に使えるメモリ約 8GB)で動くサイズのモデルを対象にしています。ベースモデルの開発・公開者の皆様に感謝いたします。
An unofficial 4-bit MLX conversion of microsoft/Sentiment-Analysis-7B for Apple Silicon Macs (sized for 16GB unified memory). All credit goes to the original authors.
- Parameters: 7.24B / License: mit (same as the base model)
Usage
pip install -U mlx-lm
mlx_lm.generate --model masahiroid/Sentiment-Analysis-7B-4bit-mlx --prompt "日本の首都はどこですか?" --max-tokens 256
from mlx_lm import load, generate
model, tokenizer = load("masahiroid/Sentiment-Analysis-7B-4bit-mlx")
messages = [{"role": "user", "content": "日本の首都はどこですか?"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=256))
Security / セキュリティ
公開前に model-audit-lite で検査しています。
- ファイル検査(pickle 形式の重み・独自コードの有無、SHA256)
- 変換前後のチャットテンプレートの一致
- 日本語の安全性プローブ(変換後モデル)
結果は SECURITY.md と audit/report.md を参照してください。
- Downloads last month
- -
Model size
7B params
Tensor type
U32
·
BF16 ·
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for masahiroid/Sentiment-Analysis-7B-4bit-mlx
Base model
mistralai/Mistral-7B-Instruct-v0.2 Finetuned
microsoft/Sentiment-Analysis-7B