Downloads · 30 days
8
24% of all-time downloads
takara-ai/qwen_rwkv_projection
qwen_rwkv_projection is a machine learning model from takara-ai. 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.
<img src="https://takara.ai/images/logo-24/TakaraAi.svg" width="200" alt="Takara.ai Logo" / From the Frontier Research Team at takara.ai we present a linear projection model that maps Qwen embeddings to RWKV embedding…
Downloads · 30 days
8
24% of all-time downloads
All-time downloads
34
Public
Parameters
3.1M
25.2 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors12.6 MB · 100%
From the Hugging Face model README
import torch
from huggingface_hub import PyTorchModelHubMixin
# Define the model class (copy this exactly)
class QwenRwkvProjection(torch.nn.Module, PyTorchModelHubMixin,
library_name="takara-ai",
tags=["embedding", "projection", "qwen", "rwkv"],
license="mit"):
def __init__(self, din=4096, dout=768):
super().__init__()
self.linear = torch.nn.Linear(din, dout, bias=False)
def forward(self, x):
return self.linear(x)
# Load from Hub
model = QwenRwkvProjection.from_pretrained("takara-ai/qwen_rwkv_projection")
model.eval()
# Project embeddings (don't forget to normalize!)
normalized_qwen_embeddings = torch.nn.functional.normalize(your_qwen_embeddings, p=2, dim=-1, eps=1e-8)
projected_embeddings = model(normalized_qwen_embeddings)