--- language: - en - zh - de - es - fr - ja library_name: pytorch pipeline_tag: text-classification base_model: google/embeddinggemma-300m tags: - extreme-multi-label-classification - embeddinggemma - multilingual --- # UserNeeds2K (FP16) This standalone variant stores all weights in FP16. EmbeddingGemma computes in BF16 for numerical stability, while the classifier computes in FP16. An extreme multi-label classifier for 2,000 categories (`Categoryv2-2000`, trained on `userneeds_samples_v3` and 2,000 encyclopedic domain overviews). Text is embedded with the bundled `google_embeddinggemma-300m` model; a 2,048-unit dynamic-negative MLP (`userneeds2k_dynamic_negative_mlp`) produces independent category scores. The package runs without downloading a separate embedding model. ## Usage ```bash pip install -r requirements.txt python example.py ``` Example output: ```text 0.6842 10004/20035/30200 Beauty & Fitness / Fitness / Fitness Instruction & Personal Training 0.5914 10004/20035/30203 Beauty & Fitness / Fitness / General Fitness 0.4418 10004/20035/31191 Beauty & Fitness / Fitness / Home Workouts, Bodyweight & Calisthenics 0.2875 10022/20214/30775 Reference / General Reference / How-To, DIY & Expert Content 0.1943 10004/20035/30202 Beauty & Fitness / Fitness / High Intensity Interval Training ``` ## Supported language keys | Key | Language | |---|---| | `cn` | Chinese | | `en` | English | | `de` | German | | `sp` | Spanish | | `fr` | French | | `jp` | Japanese | ## Performance | Test set | nDCG@5 | Precision@5 | Recall@5 | Top-1 hit | Tail recall@5 | |---|---:|---:|---:|---:|---:| | English | 0.803369 | 0.562866 | 0.758034 | 0.890662 | 0.584744 | | Chinese | 0.756571 | 0.527800 | 0.716975 | 0.857000 | 0.503401 | On an H100, this optimized FP16-storage variant processed 811.41 examples per second with 6952.34 MB peak GPU memory and achieved 0.756280 nDCG@5 on the 1,000-example precision comparison set. No training records, translated samples, document embeddings, targets, split files, or training-derived document centroids are included in this package.