初始化项目,由ModelHub XC社区提供模型

Model: prashanthsura/gemma-2-2b-legal-financial-sft-rq
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-24 11:12:09 +08:00
commit 917daaa689
12 changed files with 2460 additions and 0 deletions

20
README.md Normal file
View File

@@ -0,0 +1,20 @@
---
base_model: prashanthsura/gemma-2-2b-legal-financial-sft
library_name: transformers
---
# Gemma-2-2B legal/financial SFT -- RQ-compressed embedding
Same weights as [prashanthsura/gemma-2-2b-legal-financial-sft](https://huggingface.co/prashanthsura/gemma-2-2b-legal-financial-sft) except the tied
token-embedding matrix (256000 x 2304, ~590M params, ~22.6% of the model) has
been replaced by its 2-stage Residual Product Quantization reconstruction
(M=384 subspaces, K=1024 codewords per stage, L=2 stages ->
**3.59 bits/param** for that matrix vs 16 in bf16). Because Gemma ties
its output head to the embedding, one codebook covers both roles ("unified
codebook").
The main model files store the *reconstructed* embedding for drop-in
`from_pretrained` loading. The genuinely compressed artifact (int16 codes +
fp32 codebooks) is in `rq_M384_K1024_artifact.pt`.
Demo + head-to-head evaluation: https://prashanthsura-gemma-2-2b-rq.vercel.app