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:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masahiroid/Sentiment-Analysis-7B-4bit-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
File size: 1,349 Bytes
04a3092 7b4ba1c 04a3092 7b4ba1c 04a3092 7b4ba1c 04a3092 7b4ba1c 04a3092 7b4ba1c 04a3092 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # model-audit-lite scan: masahiroid/Sentiment-Analysis-7B-4bit-mlx
[日本語版はこちら (report.ja.md)](report.ja.md)
## File-Distribution Safety Audit
- **Pickle-format check**: No pickle-format files (`.bin`/`.pt`/`.pth`/`.pkl`, etc.) detected.
- **Bundled custom-code check**: No custom Python code requiring `trust_remote_code` was detected.
- **Checksums (SHA256)**:
```
796853172235ab3aaa4810013ddfe2eab481bda3306dad4f700c00d436eed596 chat_template.jinja
461ce245a46e07851132e2ef5ee906a8cc3e7d884893c42edf2c2da9536d025d config.json
b59394c12a80ba472c4cdd73cf923df1d5e6fb665c2c99e744f76d6c6575781e generation_config.json
7cf71faf743ce0462c0080459f639698fefbb951b0c0180b0453b379f2faabf8 model.safetensors
217c85fdbb4ce160b110221510bb401c7c587e1fc0fbd48cb36e35af1f136c94 model.safetensors.index.json
835cf54bb933752267652500a9243a9002107bbb4501b99f8d2f46ccfdad2567 tokenizer.json
c2e2a7107fadd2816b91f182a5675125d3bd36f3e295e8aa5234102a08dbc0c9 tokenizer_config.json
```
## Chat Template Conversion-Integrity Check
Comparison of the chat template (`chat_template.jinja`, or the `chat_template` field in `tokenizer_config.json`) between the source repository (`microsoft/Sentiment-Analysis-7B`) and the converted repository (`masahiroid/Sentiment-Analysis-7B-4bit-mlx`).
- ✅ Identical to the source. No alteration detected.
|