Instructions to use RampPublic/portal-qwen3-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RampPublic/portal-qwen3-8b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Publish audited portallib v0.1.0 artifact
Browse files- README.md +67 -0
- config.json +48 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: portallib
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: Qwen/Qwen3-8B
|
| 5 |
+
datasets:
|
| 6 |
+
- RampPublic/portallib-tasks
|
| 7 |
+
tags:
|
| 8 |
+
- portal
|
| 9 |
+
- hypernetwork
|
| 10 |
+
- lora
|
| 11 |
+
- peft
|
| 12 |
+
- multiple-choice
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# PorTAL refit for Qwen3-8B
|
| 16 |
+
|
| 17 |
+
This is a native [PorTAL](https://github.com/ramp-public/portallib) artifact refitted onto
|
| 18 |
+
`Qwen/Qwen3-8B`. Its 14-task latent table and canonical LoRA-generating core were learned jointly
|
| 19 |
+
from Qwen3-1.7B and Qwen3-4B and frozen during refitting. Only a fresh Qwen3-8B alignment was
|
| 20 |
+
trained. The artifact generates rank-8 LoRA factors for the query and value projections of every
|
| 21 |
+
decoder layer.
|
| 22 |
+
|
| 23 |
+
## Evaluation
|
| 24 |
+
|
| 25 |
+
One seed was evaluated on the complete 14-task validation suite using continuation log-probability
|
| 26 |
+
divided by character length (`acc_norm`). Gold continuation token-mean NLL was tracked separately
|
| 27 |
+
for checkpoint selection.
|
| 28 |
+
|
| 29 |
+
| Model | Macro `acc_norm` |
|
| 30 |
+
|---|---:|
|
| 31 |
+
| Frozen Qwen3-8B | 0.6681 |
|
| 32 |
+
| PorTAL-adapted | 0.7767 |
|
| 33 |
+
| Absolute lift | +0.1086 |
|
| 34 |
+
|
| 35 |
+
These are research benchmark results for this exact artifact and evaluation recipe, not a general
|
| 36 |
+
performance guarantee.
|
| 37 |
+
|
| 38 |
+
## Refit recipe
|
| 39 |
+
|
| 40 |
+
- Base: `Qwen/Qwen3-8B` at `b968826d9c46dd6066d109eabc6255188de91218`
|
| 41 |
+
- Frozen source carrier: `RampPublic/portal-qwen3-4b`
|
| 42 |
+
- Dataset: `RampPublic/portallib-tasks` at
|
| 43 |
+
`d35f1e8a813cfae662166164fc25965a31b01ae0`
|
| 44 |
+
- Refit data: deterministic seeded sample of up to 1,000 examples per task from the complete
|
| 45 |
+
training pool
|
| 46 |
+
- Optimization: 5 epochs, batch size 4, alignment LR `1e-3`, linear decay with 10% warmup, seed 0
|
| 47 |
+
- Trainable parameters: target-base alignment only; task latents and canonical core remain frozen
|
| 48 |
+
- Checkpoint: maximum macro validation `acc_norm`, with lower gold NLL as the tie-breaker
|
| 49 |
+
- Architecture: q/v targets, rank 8, alpha 16, task latent 256, layer embedding 32, hidden 512,
|
| 50 |
+
canonical width 1024
|
| 51 |
+
|
| 52 |
+
## Usage
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
from portallib import PortalModel
|
| 56 |
+
|
| 57 |
+
portal = PortalModel.from_pretrained(
|
| 58 |
+
"RampPublic/portal-qwen3-8b",
|
| 59 |
+
revision="v0.1.0",
|
| 60 |
+
)
|
| 61 |
+
portal.export_peft("rte", "./portal-rte-qwen3-8b")
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
See the [release recipe](https://github.com/ramp-public/portallib/blob/main/REPRODUCING.md) for the
|
| 65 |
+
full task list, evaluation definition, and refitting procedure. The artifact is Apache-2.0; the
|
| 66 |
+
benchmark dataset contains components under multiple upstream licenses documented on its dataset
|
| 67 |
+
card.
|
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha": 16,
|
| 3 |
+
"architecture": "canonical",
|
| 4 |
+
"base_model_name_or_path": "Qwen/Qwen3-8B",
|
| 5 |
+
"base_model_revision": "b968826d9c46dd6066d109eabc6255188de91218",
|
| 6 |
+
"d_core": 1024,
|
| 7 |
+
"d_layer": 32,
|
| 8 |
+
"d_z": 256,
|
| 9 |
+
"hidden": 512,
|
| 10 |
+
"in_dims": {
|
| 11 |
+
"q": 4096,
|
| 12 |
+
"v": 4096
|
| 13 |
+
},
|
| 14 |
+
"layer_path": "model.layers",
|
| 15 |
+
"library_name": "portallib",
|
| 16 |
+
"module_paths": {
|
| 17 |
+
"q": "self_attn.q_proj",
|
| 18 |
+
"v": "self_attn.v_proj"
|
| 19 |
+
},
|
| 20 |
+
"n_layers": 36,
|
| 21 |
+
"out_dims": {
|
| 22 |
+
"q": 4096,
|
| 23 |
+
"v": 1024
|
| 24 |
+
},
|
| 25 |
+
"rank": 8,
|
| 26 |
+
"schema_version": 1,
|
| 27 |
+
"target_modules": [
|
| 28 |
+
"q_proj",
|
| 29 |
+
"v_proj"
|
| 30 |
+
],
|
| 31 |
+
"task_type": "CAUSAL_LM",
|
| 32 |
+
"tasks": [
|
| 33 |
+
"truthfulqa",
|
| 34 |
+
"rte",
|
| 35 |
+
"cb",
|
| 36 |
+
"copa",
|
| 37 |
+
"wic",
|
| 38 |
+
"wsc",
|
| 39 |
+
"boolq",
|
| 40 |
+
"arc_easy",
|
| 41 |
+
"arc_challenge",
|
| 42 |
+
"hellaswag",
|
| 43 |
+
"openbookqa",
|
| 44 |
+
"winogrande",
|
| 45 |
+
"commonsense_qa",
|
| 46 |
+
"sciq"
|
| 47 |
+
]
|
| 48 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f9d42d6431fe0a8f201df8d36f841cf1151690690794ff16fb273fd193b7de0
|
| 3 |
+
size 124481816
|