Instructions to use Varun95/finetune-lama-vectordb with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Varun95/finetune-lama-vectordb with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/tinyllama-bnb-4bit") model = PeftModel.from_pretrained(base_model, "Varun95/finetune-lama-vectordb") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
TinyLlama LoRA Adapter – Black Holes Physics
Model Description
This is a LoRA (Low‑Rank Adaptation) adapter for the unsloth/tinyllama-bnb-4bit base model.
It has been fine‑tuned on a synthetic question‑answer dataset generated from the textbook "Physics of Black Holes" (2009). The adapter enhances the model's ability to answer domain‑specific questions about general relativity, event horizons, Hawking radiation, and black hole thermodynamics.
- Developed by: Varun95
- Model type: Causal language model with LoRA adapters (PEFT)
- Language(s): English
- Finetuned from:
unsloth/tinyllama-bnb-4bit - License: Apache 2.0
Intended Uses & Limitations
Direct Use
The adapter is meant to be used on top of the base TinyLlama model for retrieval‑augmented generation (RAG) or direct Q&A about black hole physics.
It works best when provided with context from the original textbook (e.g., via vector search).
Limitations
- The model is not a standalone – it requires the base model to be loaded.
- Knowledge is confined to the contents of a single 2009 textbook; it may not reflect recent discoveries.
- Generated answers may be verbose or occasionally hallucinate; always verify against the source.
How to Use
Loading the Adapter (Recommended)
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the quantized base model
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/tinyllama-bnb-4bit",
load_in_4bit=True,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("unsloth/tinyllama-bnb-4bit")
tokenizer.pad_token = tokenizer.eos_token
# Load your LoRA adapter
model = PeftModel.from_pretrained(base_model, "Varun95/finetune-lama-vectordb")
# Inference
prompt = "What is a black hole?"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 6
Model tree for Varun95/finetune-lama-vectordb
Base model
unsloth/tinyllama-bnb-4bit