Instructions to use AbdulSittar/llama2-lora-climate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AbdulSittar/llama2-lora-climate with PEFT:
Task type is invalid.
- Transformers
How to use AbdulSittar/llama2-lora-climate with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AbdulSittar/llama2-lora-climate") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbdulSittar/llama2-lora-climate", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AbdulSittar/llama2-lora-climate with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AbdulSittar/llama2-lora-climate" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbdulSittar/llama2-lora-climate", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AbdulSittar/llama2-lora-climate
- SGLang
How to use AbdulSittar/llama2-lora-climate with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AbdulSittar/llama2-lora-climate" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbdulSittar/llama2-lora-climate", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AbdulSittar/llama2-lora-climate" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbdulSittar/llama2-lora-climate", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AbdulSittar/llama2-lora-climate with Docker Model Runner:
docker model run hf.co/AbdulSittar/llama2-lora-climate
LoRA Climate Model
Model Overview
Model Name: LoRA Climate
Developed by: Abdul Sittar
Model Type: Text Generation (PEFT, LoRA)
Frameworks: Hugging Face Transformers, PEFT, Safetensors
Languages: English
License: Apache 2.0
This model is a LoRA-finetuned version of LLaMA2 7B, adapted for climate-related conversational tasks. It supports safe and efficient text generation while keeping the base model frozen and training only LoRA adapters.
Model Description
This model is intended for climate-related text generation, conversational tasks, and research purposes. It was trained using LoRA adapters on climate datasets and is compatible with Hugging Face Transformers for inference.
- LoRA adapters: Low-rank adaptation for efficient fine-tuning
- Base model: LLaMA2 7B
- Model weights format: Safetensors
- Intended use: Research, simulation, conversational AI for climate domain
Dataset Used
This model was trained using the Social Graph Inference Reddit dataset:
DOI / Link: https://zenodo.org/records/18082502
Authors/Creators:
- Sittar, Abdul
- Guček, Alenka
- Češnovar, Miha
Description:
A large-scale, empirically grounded dataset from Reddit to support agent-based social simulations. Includes:
- 33 technology-focused agents
- 14 climate-focused agents
- 7 COVID-related agents
- Each domain includes over one million posts and comments
The dataset defines agent categories, derives inter-agent relationships, and builds directed, weighted networks reflecting real user interactions.
License
This model is released under the Apache 2.0 License, which allows:
- Commercial and non-commercial use
- Modification and redistribution
- Requires attribution to the original author
Model Files
Included files:
adapter_model.safetensors– LoRA adapter weightstokenizer.model– Tokenizer modeltokenizer.json– Tokenizer JSON configadapter_config.json– LoRA configurationtokenizer_config.json– Tokenizer configurationspecial_tokens_map.json– Special tokens mappingchat_template.jinja– Conversation template for inferenceREADME.md– Model card and instructions
All large binaries are tracked via Git LFS.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "AbdulSittar/llama2-lora-climate"
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Load base model with LoRA adapters
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
model.eval()
# Generate text
prompt = "Climate change impacts on renewable energy:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 9