Downloads · 30 days
20
18% of all-time downloads
lemms/openllm-small-extended-6k
openllm-small-extended-6k is a text generation model from lemms. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gpl-3.0.
This is the OpenLLM Small Extended model trained for 6,000 steps on Wikipedia passages from the SQUAD dataset.
Downloads · 30 days
20
18% of all-time downloads
All-time downloads
109
Public
Repo size
169 MB
Likes
0
Public
Click a slice to open those files.
.bin168 MB · 100%
From the Hugging Face model README
This is the OpenLLM Small Extended model trained for 6,000 steps on Wikipedia passages from the SQUAD dataset.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load model and tokenizer
model_name = "lemms/openllm-small-extended-6k"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Generate text
prompt = "The history of artificial intelligence"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
inputs.input_ids,
max_new_tokens=50,
temperature=0.7,
top_k=40,
do_sample=True
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
# Use the provided load_hf_model.py script
from load_hf_model import load_model_and_tokenizer
model, tokenizer = load_model_and_tokenizer()
# ... rest of usage
This model was trained using the OpenLLM training pipeline:
This model is dual-licensed:
For commercial licensing, contact: [email protected]
If you use this model in your research, please cite:
@misc{openllm2024,
title={OpenLLM: Open Source Large Language Model},
author={Louis Chua Bean Chong},
year={2024},
url={https://github.com/louischua/openllm}
}