GeoGPT-Research-Project/GeoGPT-QA
Viewer • Updated • 41.4k • 120 • 28
How to use yasserrmd/GeoScholar-QA-1.2B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="yasserrmd/GeoScholar-QA-1.2B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("yasserrmd/GeoScholar-QA-1.2B")
model = AutoModelForCausalLM.from_pretrained("yasserrmd/GeoScholar-QA-1.2B")How to use yasserrmd/GeoScholar-QA-1.2B with Unsloth Studio:
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 yasserrmd/GeoScholar-QA-1.2B to start chatting
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 yasserrmd/GeoScholar-QA-1.2B to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for yasserrmd/GeoScholar-QA-1.2B to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="yasserrmd/GeoScholar-QA-1.2B",
max_seq_length=2048,
)
GeoScholar-QA is a large language model fine-tuned for academic question answering in the field of geoscience. It is built upon the Liquid AI LFM2 base model and has been trained using the Unsloth framework with the GeoGPT-QA dataset. [4] This model's primary strength lies in its ability to explain concepts and theories within the earth sciences. It is not designed to provide consistently accurate statistics or citations.
train split. [4]question, answer, title, authors, doi, journal, volume, pages, and license. [4]GeoScholar-QA is intended for the following applications:
This model is not intended for:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "yasserrmd/GeoScholar-QA-1.2B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
messages = [
{"role": "user", "content": "How do plate tectonics explain the formation of volcanoes along subduction zones?"}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.3,
repetition_penalty=1.05
)
print(tokenizer.decode(outputs, skip_special_tokens=True))