Instructions to use snapcart-ai/sam-1-base-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use snapcart-ai/sam-1-base-lora with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("snapcart-ai/sam-1-base-lora") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use snapcart-ai/sam-1-base-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "snapcart-ai/sam-1-base-lora" --prompt "Once upon a time"
SAM-1-Base LoRA Adapter
LoRA adapter weights for SAM-1-Base, a shopping assistant model built on Qwen2.5-7B-Instruct.
SAM-1-Base is fine-tuned for commerce reasoning tasks including product recommendation, review synthesis, price analysis, and personalized shopping assistance.
Model Details
- Base model: Qwen/Qwen2.5-7B-Instruct
- Adapter type: LoRA (rank 16)
- Format: MLX safetensors
- SAM-Bench score: 90.55 / 100
SAM-Bench Results
| Category | Score |
|---|---|
| Query Understanding | 98.4 |
| Product Recommendation | 95.2 |
| Product Comparison | 93.1 |
| Review Synthesis | 91.0 |
| Price Analysis | 89.7 |
| Purchase Decision | 88.4 |
| Attribute Extraction | 85.3 |
| Personalization | 77.6 |
| Overall | 90.55 |
Usage
This adapter is in MLX format. To use with MLX:
from mlx_lm import load, generate
model, tokenizer = load(
"Qwen/Qwen2.5-7B-Instruct",
adapter_path="snapcart-ai/sam-1-base-lora"
)
prompt = "Compare these two laptops and recommend which one to buy..."
response = generate(model, tokenizer, prompt=prompt, max_tokens=512)
print(response)
For the merged model (no adapter loading required), see snapcart-ai/sam-1-base.
Benchmark
Evaluated on SAM-Bench โ 1,200 tasks across 8 shopping assistant task types and 3 difficulty levels.
License
Apache 2.0
Hardware compatibility
Log In to add your hardware
Quantized
Model tree for snapcart-ai/sam-1-base-lora
Evaluation results
- SAM-Bench Overall Score on SAM-Benchself-reported90.550