Instructions to use Syigen/rgcm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Syigen/rgcm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Syigen/rgcm")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Syigen/rgcm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload Concept Memory base model
Browse files- README.md +66 -1
- config.json +16 -0
- model.pt +3 -0
README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: concept-memory-model
|
| 3 |
+
tags:
|
| 4 |
+
- text-classification
|
| 5 |
+
- multi-task
|
| 6 |
+
- pytorch
|
| 7 |
+
- transformers
|
| 8 |
+
datasets:
|
| 9 |
+
- mteb/banking77
|
| 10 |
+
- nyu-mll/glue
|
| 11 |
+
- google/boolq
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
# Concept Memory typed judgment base model
|
| 15 |
+
|
| 16 |
+
This repository contains the task-fine-tuned Concept Memory checkpoint for
|
| 17 |
+
criteria-conditioned Choice, ordinal Score, and Yes/No (Noul) judgments. It is
|
| 18 |
+
not a language model pretrained from scratch. Its text encoder is
|
| 19 |
+
`sentence-transformers/all-mpnet-base-v2`.
|
| 20 |
+
|
| 21 |
+
## Files
|
| 22 |
+
|
| 23 |
+
- `model.pt`: PyTorch state dictionary and training metadata.
|
| 24 |
+
- `config.json`: encoder, task, and training run metadata.
|
| 25 |
+
|
| 26 |
+
## Load the checkpoint
|
| 27 |
+
|
| 28 |
+
Install this project's dependencies, then load it with the repository's model
|
| 29 |
+
class:
|
| 30 |
+
|
| 31 |
+
```python
|
| 32 |
+
import torch
|
| 33 |
+
from huggingface_hub import hf_hub_download
|
| 34 |
+
from concept_memory import ConceptMemoryModel
|
| 35 |
+
|
| 36 |
+
repo_id = "Syigen/rgcm"
|
| 37 |
+
checkpoint = hf_hub_download(repo_id, "model.pt")
|
| 38 |
+
payload = torch.load(checkpoint, map_location="cpu", weights_only=False)
|
| 39 |
+
model = ConceptMemoryModel.from_pretrained(
|
| 40 |
+
payload["encoder"],
|
| 41 |
+
decision_size=payload["decision_size"],
|
| 42 |
+
max_length=payload["max_length"],
|
| 43 |
+
)
|
| 44 |
+
model.load_state_dict(payload["model_state_dict"])
|
| 45 |
+
model.eval()
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
The Hub checkpoint is a PyTorch artifact for this project's Python package; it
|
| 49 |
+
is not directly compatible with `transformers.AutoModel.from_pretrained`.
|
| 50 |
+
|
| 51 |
+
## Training metadata
|
| 52 |
+
|
| 53 |
+
{
|
| 54 |
+
"datasets": [
|
| 55 |
+
"mteb/banking77",
|
| 56 |
+
"nyu-mll/glue:sst2",
|
| 57 |
+
"google/boolq"
|
| 58 |
+
],
|
| 59 |
+
"task_types": [
|
| 60 |
+
"choice",
|
| 61 |
+
"score",
|
| 62 |
+
"noul"
|
| 63 |
+
],
|
| 64 |
+
"encoder": "sentence-transformers/all-mpnet-base-v2",
|
| 65 |
+
"epochs": 10,
|
| 66 |
+
"batch_size": 16,
|
| 67 |
+
"seed": 42
|
| 68 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"datasets": [
|
| 3 |
+
"mteb/banking77",
|
| 4 |
+
"nyu-mll/glue:sst2",
|
| 5 |
+
"google/boolq"
|
| 6 |
+
],
|
| 7 |
+
"task_types": [
|
| 8 |
+
"choice",
|
| 9 |
+
"score",
|
| 10 |
+
"noul"
|
| 11 |
+
],
|
| 12 |
+
"encoder": "sentence-transformers/all-mpnet-base-v2",
|
| 13 |
+
"epochs": 10,
|
| 14 |
+
"batch_size": 16,
|
| 15 |
+
"seed": 42
|
| 16 |
+
}
|
model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:132601f48375db2125bf009ac9983013cdafc3c87638db1fe08a61fca44f0c38
|
| 3 |
+
size 437320470
|