Downloads · 30 days
26
4% of all-time downloads
chrisyuan45/TimeLlama-7b
TimeLlama-7b is a text generation model from chrisyuan45. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc.
TimeLlama is an instruction-finetuned Llama2 series that improves complex temporal reasoning ability. In this work, we introduce the first multi-source dataset for explainable temporal reasoning, called ExpTime. The d…
Downloads · 30 days
26
4% of all-time downloads
All-time downloads
591
Public
Parameters
6.7B
53.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin27 GB · 50%
From the Hugging Face model README
TimeLlama is an instruction-finetuned Llama2 series that improves complex temporal reasoning ability.
In this work, we introduce the first multi-source dataset for explainable temporal reasoning, called ExpTime. The dataset contains 26k examples derived from temporal knowledge graph datasets. Each example includes a context with multiple events, a future event to predict, and an explanation for the prediction in the form of temporal reasoning over the events.
To generate the dataset, we propose a novel knowledge-graph-instructed-generation strategy. The dataset supports the comprehensive evaluation of large language models on complex temporal reasoning, future event prediction, and explainability.
Based on ExpTime, we develop TimeLlaMA, a series of LLM models fine-tuned for explainable temporal reasoning. TimeLlaMA builds on the foundation LLM LLaMA-2 and utilizes instruction tuning to follow prompts for making explanations.
from transformers import LlamaConfig, LlamaTokenizer, LlamaForCausalLM
# Model names: "chrisyuan45/TimeLlama-7b-chat", "chrisyuan45/TimeLlama-13b-chat"
model = LlamaForCausalLM.from_pretrained(
model_name,
return_dict=True,
load_in_8bit=quantization,
device_map="auto",
low_cpu_mem_usage=True)
tokenizer = LlamaTokenizer.from_pretrained(model_name)
Please check our repository for the detailed finetuning method.