NousResearch/CharacterCodex
Viewer • Updated • 15.9k • 544 • 245
How to use Croc-Prog-HF/LoreWeaver-1_full with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "summarization" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("summarization", model="Croc-Prog-HF/LoreWeaver-1_full") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Croc-Prog-HF/LoreWeaver-1_full")
model = AutoModelForSeq2SeqLM.from_pretrained("Croc-Prog-HF/LoreWeaver-1_full", device_map="auto")LoreWeaver-1_full is an LLM derived by merging the weights of LoreWeaver-1_adapted (unavailable), which was specifically trained to summarize episode synopses and manga/comics in the Anime category.
It has proven effective in terms of quality when summarizing texts ranging from 10 to 40 sentences (150–1,000 tokens, based on the SentencePiece tokenizer with a vocabulary of approximately 32,128 tokens). However, quality may decline when the text falls below 80 tokens (approximately 6.5 sentences). Regarding the upper limit, LoreWeaver-2 begins to show a loss of detail with texts exceeding 2,300 tokens (approximately 59 sentences).
Base model
Croc-Prog-HF/LoreWeaver-1_adapted