Upload SAM-1-Base LoRA adapter weights
Browse files- README.md +83 -0
- adapter_config.json +10 -0
- adapters.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 7 |
+
tags:
|
| 8 |
+
- shopping
|
| 9 |
+
- e-commerce
|
| 10 |
+
- lora
|
| 11 |
+
- mlx
|
| 12 |
+
- qwen2
|
| 13 |
+
library_name: mlx
|
| 14 |
+
datasets:
|
| 15 |
+
- snapcart-ai/sam-bench
|
| 16 |
+
model-index:
|
| 17 |
+
- name: SAM-1-Base-LoRA
|
| 18 |
+
results:
|
| 19 |
+
- task:
|
| 20 |
+
type: text-generation
|
| 21 |
+
name: Shopping Assistant Evaluation
|
| 22 |
+
dataset:
|
| 23 |
+
name: SAM-Bench
|
| 24 |
+
type: snapcart-ai/sam-bench
|
| 25 |
+
metrics:
|
| 26 |
+
- type: custom
|
| 27 |
+
name: SAM-Bench Overall Score
|
| 28 |
+
value: 90.55
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
# SAM-1-Base LoRA Adapter
|
| 32 |
+
|
| 33 |
+
LoRA adapter weights for **SAM-1-Base**, a shopping assistant model built on [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct).
|
| 34 |
+
|
| 35 |
+
SAM-1-Base is fine-tuned for commerce reasoning tasks including product recommendation, review synthesis, price analysis, and personalized shopping assistance.
|
| 36 |
+
|
| 37 |
+
## Model Details
|
| 38 |
+
|
| 39 |
+
- **Base model:** Qwen/Qwen2.5-7B-Instruct
|
| 40 |
+
- **Adapter type:** LoRA (rank 16)
|
| 41 |
+
- **Format:** MLX safetensors
|
| 42 |
+
- **SAM-Bench score:** 90.55 / 100
|
| 43 |
+
|
| 44 |
+
## SAM-Bench Results
|
| 45 |
+
|
| 46 |
+
| Category | Score |
|
| 47 |
+
|----------|-------|
|
| 48 |
+
| Query Understanding | 98.4 |
|
| 49 |
+
| Product Recommendation | 95.2 |
|
| 50 |
+
| Product Comparison | 93.1 |
|
| 51 |
+
| Review Synthesis | 91.0 |
|
| 52 |
+
| Price Analysis | 89.7 |
|
| 53 |
+
| Purchase Decision | 88.4 |
|
| 54 |
+
| Attribute Extraction | 85.3 |
|
| 55 |
+
| Personalization | 77.6 |
|
| 56 |
+
| **Overall** | **90.55** |
|
| 57 |
+
|
| 58 |
+
## Usage
|
| 59 |
+
|
| 60 |
+
This adapter is in MLX format. To use with [MLX](https://github.com/ml-explore/mlx):
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
from mlx_lm import load, generate
|
| 64 |
+
|
| 65 |
+
model, tokenizer = load(
|
| 66 |
+
"Qwen/Qwen2.5-7B-Instruct",
|
| 67 |
+
adapter_path="snapcart-ai/sam-1-base-lora"
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
prompt = "Compare these two laptops and recommend which one to buy..."
|
| 71 |
+
response = generate(model, tokenizer, prompt=prompt, max_tokens=512)
|
| 72 |
+
print(response)
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
For the merged model (no adapter loading required), see [snapcart-ai/sam-1-base](https://huggingface.co/snapcart-ai/sam-1-base).
|
| 76 |
+
|
| 77 |
+
## Benchmark
|
| 78 |
+
|
| 79 |
+
Evaluated on [SAM-Bench](https://github.com/snapcart-ai/sam-bench) — 1,200 tasks across 8 shopping assistant task types and 3 difficulty levels.
|
| 80 |
+
|
| 81 |
+
## License
|
| 82 |
+
|
| 83 |
+
Apache 2.0
|
adapter_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "Qwen/Qwen2.5-7B-Instruct",
|
| 3 |
+
"fine_tune_type": "lora",
|
| 4 |
+
"lora_parameters": {
|
| 5 |
+
"rank": 16,
|
| 6 |
+
"dropout": 0.05,
|
| 7 |
+
"scale": 20.0
|
| 8 |
+
},
|
| 9 |
+
"num_layers": 16
|
| 10 |
+
}
|
adapters.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed9ff8fff0043ef03ee9ed7acf55c77aa954f585b3dc7926d942fb805fab1f7d
|
| 3 |
+
size 92299188
|