Instructions to use ivanasp/Llama-3.2-1B-JSON-Extractor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ivanasp/Llama-3.2-1B-JSON-Extractor with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ivanasp/Llama-3.2-1B-JSON-Extractor", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use ivanasp/Llama-3.2-1B-JSON-Extractor with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ivanasp/Llama-3.2-1B-JSON-Extractor to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ivanasp/Llama-3.2-1B-JSON-Extractor to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ivanasp/Llama-3.2-1B-JSON-Extractor to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ivanasp/Llama-3.2-1B-JSON-Extractor", max_seq_length=2048, )
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,21 +1,46 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
tags:
|
| 4 |
-
- text-
|
| 5 |
-
- transformers
|
| 6 |
- unsloth
|
| 7 |
-
- llama
|
| 8 |
-
|
|
|
|
| 9 |
language:
|
| 10 |
- en
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
- **License:** apache-2.0
|
| 17 |
-
- **Finetuned from model :** unsloth/llama-3.2-1b-instruct-bnb-4bit
|
| 18 |
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: unsloth/Llama-3.2-1B-instruct-bnb-4bit
|
| 4 |
tags:
|
| 5 |
+
- text-to-json
|
|
|
|
| 6 |
- unsloth
|
| 7 |
+
- llama-3
|
| 8 |
+
- fine-tuned
|
| 9 |
+
- extraction
|
| 10 |
language:
|
| 11 |
- en
|
| 12 |
+
- es
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# 🚀 Llama-3.2-1B-JSON-Extractor
|
| 16 |
+
|
| 17 |
+
This model is a professional fine-tuned version of **Llama 3.2 1B Instruct**, specialized in converting **Natural Language into structured JSON objects**.
|
| 18 |
+
|
| 19 |
+
## 🎯 Project Goal
|
| 20 |
+
The system interprets human intent and extracts key entities into a machine-readable format. It is designed to be the bridge between human communication and database systems.
|
| 21 |
+
|
| 22 |
+
### Extracted Fields:
|
| 23 |
+
- `product`: Name or description of the item.
|
| 24 |
+
- `price`: Numerical value (currency independent).
|
| 25 |
+
- `category`: Market segment or classification.
|
| 26 |
+
|
| 27 |
+
## 🛠️ Technical Specifications
|
| 28 |
+
- **Architecture**: Llama 3.2 1B
|
| 29 |
+
- **Optimization**: QLoRA (4-bit)
|
| 30 |
+
- **Rank (r)**: 16
|
| 31 |
+
- **Alpha**: 32
|
| 32 |
+
- **Learning Rate**: 2e-4
|
| 33 |
+
- **Final Training Loss**: ~0.013 (High precision)
|
| 34 |
|
| 35 |
+
## 💡 Usage Example
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
**Input:**
|
| 38 |
+
> "I want to sell a Sony PlayStation 5 for 500 dollars in the gaming category."
|
| 39 |
|
| 40 |
+
**Output:**
|
| 41 |
+
```json
|
| 42 |
+
{
|
| 43 |
+
"product": "Sony PlayStation 5",
|
| 44 |
+
"price": 500,
|
| 45 |
+
"category": "gaming"
|
| 46 |
+
}
|