Downloads · 30 days
9
26% of all-time downloads
d0ks/perry-anderson-lora
perry-anderson-lora is a machine learning model from d0ks. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter fine-tuned on the writing style of Perry Anderson, the British historian and essayist.
Downloads · 30 days
9
26% of all-time downloads
All-time downloads
35
Public
Repo size
18.8 GB
Likes
0
Public
Click a slice to open those files.
.safetensors18.8 GB · 100%
From the Hugging Face model README
A LoRA adapter fine-tuned on the writing style of Perry Anderson, the British historian and essayist.
moonshotai/Kimi-K2-ThinkingPerry Anderson's prose is characterized by:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"moonshotai/Kimi-K2-Thinking",
trust_remote_code=True
)
model = PeftModel.from_pretrained(base_model, "YOUR_USERNAME/perry-anderson-lora")
tokenizer = AutoTokenizer.from_pretrained(
"moonshotai/Kimi-K2-Thinking",
trust_remote_code=True
)
# Generate text
inputs = tokenizer("The trajectory of European socialism", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))
Fine-tuned using causal language modeling on excerpts from Perry Anderson's essays and books, including works from New Left Review and Verso publications.