|
Download README.md from anonom799/dm_qwen4b_emulator: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/anonom799/dm_qwen4b_emulator/resolve/main/README.md
- Command line
-
hf download hf://anonom799/dm_qwen4b_emulator/README.md
-
curl -L -o README.md https://huggingface.co/anonom799/dm_qwen4b_emulator/resolve/main/README.md
1.21 kB
metadata
tags:
- pytorch
- safetensors
license: mit
dm_qwen4b_emulator
MLP with 3 hidden Linear->LayerNorm->ReLU block(s) and a linear output head.
Config
input_dim: 6hidden_dim: 512output_dim: 3n_layers: 3
Usage
import torch
import torch.nn as nn
from safetensors.torch import load_file
from huggingface_hub import hf_hub_download
class MLP(nn.Module):
def __init__(self, input_dim, hidden_dim, output_dim):
super().__init__()
self.mlp = nn.Sequential(
nn.Linear(input_dim, hidden_dim),
nn.LayerNorm(hidden_dim),
nn.ReLU(),
nn.Linear(hidden_dim, hidden_dim),
nn.LayerNorm(hidden_dim),
nn.ReLU(),
nn.Linear(hidden_dim, hidden_dim),
nn.LayerNorm(hidden_dim),
nn.ReLU(),
nn.Linear(hidden_dim, output_dim),
)
def forward(self, x):
return self.mlp(x)
path = hf_hub_download("anonom799/dm_qwen4b_emulator", "model.safetensors")
model = MLP(input_dim=6, hidden_dim=512, output_dim=3)
model.load_state_dict(load_file(path))
model.eval()
with torch.no_grad():
out = model(torch.randn(1, 6))