Views
No views yet

I'm simply exploring the possibility of linearizing existing Transformer models. It's still far from perfect, but I hope you'll bear with me as I continue this journey. :)
transformers library. Ensure you have transformers installed: pip install transformers.
When loading, remember to set trust_remote_code=True because of the custom architecture.1from transformers import pipeline, AutoTokenizer
2import torch
3
4model_name = "OpenMOSE/HRWKV7-Reka-Flash3-Preview" # Replace with the actual model ID if different
5tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
6pipe = pipeline(
7 "text-generation",
8 model_name,
9 tokenizer=tokenizer,
10 torch_dtype=torch.bfloat16, # or torch.float16 depending on your GPU and model precision
11 device_map="auto",
12 trust_remote_code=True,
13)
14
15text = "The quick brown fox jumps over the lazy "
16result = pipe(text, max_new_tokens=20, do_sample=True, top_p=0.9, temperature=0.7)[0]["generated_text"]
17print(result)1curl http://127.0.0.1:9000/loadmodel -X POST -H "Content-Type: application/json" -d '{"model_filename":"/home/client/Projects/llm/hxa079-reka-flash3-stage2-hybrid.pth","model_viewname":"RWKV HXA079 L38T6 Reka Flash3","model_strategy":"int8","adapter_filename":"","adapter_mode":"", "template":"rekaflash3", "endtoken":"
2 <sep>","default_temperature":"0.2", "default_top_p":"0.3", "rope_theta":"8000000.0", "rms_norm_eps":"1e-5"}'
31@misc{goldstein2025radladsrapidattentiondistillation,
2 title={RADLADS: Rapid Attention Distillation to Linear Attention Decoders at Scale},
3 author={Daniel Goldstein and Eric Alcaide and Janna Lu and Eugene Cheah},
4 year={2025},
5 eprint={2505.03005},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2505.03005},
9}