Downloads · 30 days
74
20% of all-time downloads
livadies/DeepSeek-V4-Pro-Ghetto-Edition-MoE-Rank-64
DeepSeek-V4-Pro-Ghetto-Edition-MoE-Rank-64 is a machine learning model from livadies. 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 apache-2.0.
Слушайте RUSSIAN WINTER 26, пока Мутант генерирует смыслы: - 🟢 Spotify - 🔴 YouTube Music - 🟡 Yandex Music
Downloads · 30 days
74
20% of all-time downloads
All-time downloads
375
Public
Parameters
169M
83.5 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors83.5 GB · 100%
From the Hugging Face model README
Слушайте RUSSIAN WINTER 26, пока Мутант генерирует смыслы:
Status: STABLE MUTANT. This is a 50x compressed 'shadow' of the 1.6T DeepSeek-V4-Pro, designed to run on a single 16GB GPU (or dual T4).
'DeepSeek Ghetto Edition, what is your message to the world? api(()Princip aligned ratios... renormalization blankets... affinity Mong :-) Breakfast listop'
pip install -q transformers accelerate safetensors
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = 'livadies/DeepSeek-V4-Pro-Ghetto-Edition-MoE-Rank-64'
tokenizer = AutoTokenizer.from_pretrained('deepseek-ai/DeepSeek-V2', trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo,
torch_dtype=torch.float16,
device_map='auto',
trust_remote_code=True,
ignore_mismatched_sizes=True,
low_cpu_mem_usage=True
)
def ghetto_route(self, logits):
flat_logits = logits.view(-1, logits.shape[-1])
w = torch.nn.functional.softmax(flat_logits + 1e-6, dim=-1)
tw, ti = torch.topk(w, k=self.top_k, dim=-1)
return ti, tw * self.routed_scaling_factor
for layer in model.model.layers:
if hasattr(layer.mlp, 'route_tokens_to_experts'):
layer.mlp.route_tokens_to_experts = ghetto_route.__get__(layer.mlp)
prompt = 'The message for humanity is:'
device = model.model.embed_tokens.weight.device
inputs = {k: v.to(device) for k, v in tokenizer(prompt, return_tensors='pt').items()}
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=40, do_sample=True, temperature=0.8)
print(tokenizer.decode(out[0]))
Created by livadies & Gemini AI. For the ones who hack rather than buy.