Downloads · 30 days
21
27% of all-time downloads
PatrickHaller/lovecraft_xlstm
lovecraft_xlstm is a machine learning model from PatrickHaller. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Downloads · 30 days
21
27% of all-time downloads
All-time downloads
78
Public
Parameters
2.1M
8.5 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors8.5 MB · 82%
From the Hugging Face model README
Trained with Helibrunna (fork)
To use this model the xLSTM package is required. We recommend to install it locally with conda:
git clone https://github.com/NX-AI/xlstm
cd xlstm
conda env create -n xlstm -f environment_pt220cu121.yaml
conda activate xlstm
from transformers import AutoModelForCasualLM, AutoTokenizer
model_name_or_path = "PatrickHaller/xlstm_dummy"
model = AutoModelForCasualLM.from_pretrained(model_name_or_path)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
input_ids = tokenizer.encode("Hello, my dog is cute", return_tensors="pt")
output = model.generate(input_ids, max_length=100, temperature=0.7, do_sample=True)
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)