Text Classification
Transformers
JAX
pcmlp
feature-extraction
predictive-coding
local-loss
flax
tiny-model
custom-architecture
custom_code
Eval Results (legacy)
Instructions to use zeechimp/pc-mlp-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zeechimp/pc-mlp-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="zeechimp/pc-mlp-tiny", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zeechimp/pc-mlp-tiny", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_pcmlp.py from zeechimp/pc-mlp-tiny: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/zeechimp/pc-mlp-tiny/resolve/main/configuration_pcmlp.py
- Command line
-
hf download hf://zeechimp/pc-mlp-tiny/configuration_pcmlp.py
-
curl -L -o configuration_pcmlp.py https://huggingface.co/zeechimp/pc-mlp-tiny/resolve/main/configuration_pcmlp.py
587 Bytes
| """Configuration for PC-MLP. Required for auto_map + trust_remote_code.""" | |
| from transformers import PretrainedConfig | |
| class PCMLPConfig(PretrainedConfig): | |
| model_type = "pcmlp" | |
| def __init__( | |
| self, | |
| vocab_size=16, | |
| seq_len=16, | |
| num_classes=2, | |
| hidden_dim=32, | |
| local_loss_weight=0.1, | |
| **kwargs, | |
| ): | |
| self.vocab_size = vocab_size | |
| self.seq_len = seq_len | |
| self.num_classes = num_classes | |
| self.hidden_dim = hidden_dim | |
| self.local_loss_weight = local_loss_weight | |
| super().__init__(**kwargs) |