YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)
# SoACer
This Hugging Face repository contains the best‐performing
`DownstreamModelSingle` classifier head trained on SoAC embeddings.
## Model Files
- `pytorch_model.bin`: PyTorch `state_dict()` of the classifier head.
- `config.json`: JSON with model hyperparameters (embed_size, common_dim, etc.).
- `README.md`: Usage instructions.
## How to load
```python
import torch
from DownstreamModelSingle import DownstreamModelSingle
# 1) Clone the repo
# git clone https://huggingface.co/Shahriar/SoACer
# 2) Load config.json
import json
cfg = json.load(open("SoACer/config.json"))
model = DownstreamModelSingle(
embed_size=cfg["embed_size"],
class_num=cfg["class_num"],
common_dim=cfg["common_dim"]
)
# 3) Load weights
state_dict = torch.load("SoACer/pytorch_model.bin", map_location="cpu")
model.load_state_dict(state_dict)
model.eval()
# 4) Use `model` on new precomputed embeddings:
# given `new_embedding`: a 1D Tensor of size (embed_size,)
# logits = model(new_embedding.unsqueeze(0)) # shape (1, class_num)
# probs = torch.softmax(logits, dim=-1)
# ```
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support