--- base_model: unsloth/tinyllama-chat-bnb-4bit tags: - text-generation-inference - transformers - unsloth - llama - trl license: apache-2.0 language: - en --- # Fine-tuned TinyLlama for JSON Extraction This repository contains a fine-tuned version of the `unsloth/tinyllama-chat-bnb-4bit` model, specifically trained for extracting product information from HTML snippets and outputting it in a JSON format. ## Model Details - **Base Model:** `unsloth/tinyllama-chat-bnb-4bit` - **Fine-tuning Method:** LoRA (Low-Rank Adaptation) - **Trained on:** A custom dataset `json_extraction_dataset_500.json` of HTML product snippets and their corresponding JSON representations. ## Usage This model can be used for tasks involving structured data extraction from HTML content. ### Loading the model You can load the model and tokenizer using the `transformers` library: ```python from unsloth import FastLanguageModel import torch import json model_name = "learn-abc/html-model-tinyllama-chat-bnb-4bit" # Hugging face model repo ID max_seq_length = 2048 # Or your chosen sequence length dtype = None # Auto detection model, tokenizer = FastLanguageModel.from_pretrained( model_name = model_name, max_seq_length = max_seq_length, dtype = dtype, load_in_4bit = True, ) FastLanguageModel.for_inference(model) messages = [ {"role": "user", "content": "Extract the product information:\n
](https://github.com/unslothai/unsloth)