Link model card to paper and GitHub repository

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +135 -133
README.md CHANGED
@@ -1,133 +1,135 @@
1
- ---
2
- base_model: NaviGen-stage2-base
3
- library_name: peft
4
- pipeline_tag: text-generation
5
- tags:
6
- - navigen
7
- - grpo
8
- - lora
9
- - peft
10
- - qwen3
11
- - transformers
12
- - trl
13
- - unsloth
14
- ---
15
-
16
- # NaviGen GRPO Adapter - step600
17
-
18
- This repository contains the GRPO-trained LoRA adapter used by **NaviGen**, a personalized generative recommendation model for producing user-aware image and video generation instructions.
19
-
20
- NaviGen represents each item with a dual identifier that couples a collaborative code and a textual code in one token stream. This adapter is the reinforcement learning stage of the NaviGen pipeline: it further aligns the stage-2 supervised model with user intent through reward-guided optimization.
21
-
22
- ## Model Details
23
-
24
- - **Model name:** NaviGen GRPO Adapter, step600
25
- - **Model type:** PEFT LoRA adapter for causal language modeling
26
- - **Base model:** `NaviGen-stage2-base`
27
- - **Backbone family:** Qwen3-style causal LM
28
- - **Training stage:** GRPO reinforcement learning after two-stage SFT
29
- - **Adapter format:** `adapter_model.safetensors`
30
- - **PEFT version:** 0.19.1
31
-
32
- The adapter targets the main attention and MLP projection layers:
33
-
34
- ```text
35
- q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
36
- ```
37
-
38
- ## Intended Use
39
-
40
- This adapter is intended for research on personalized generative recommendation, especially settings where a model should infer user preference from historical item identifiers and produce more specific, relevant, and visually generatable generation instructions.
41
-
42
- Typical uses include:
43
-
44
- - Personalized prompt or instruction generation for image/video models
45
- - Next-item or identifier prediction under the NaviGen token format
46
- - Reproduction and analysis of the NaviGen RL stage
47
- - Ablation studies comparing SFT and GRPO-aligned checkpoints
48
-
49
- This adapter is **not** a standalone model. It must be loaded on top of the corresponding NaviGen stage-2 base model.
50
-
51
- ## Quick Start
52
-
53
- Install the main dependencies:
54
-
55
- ```bash
56
- pip install torch transformers peft safetensors
57
- ```
58
-
59
- Load the adapter with PEFT:
60
-
61
- ```python
62
- from transformers import AutoModelForCausalLM, AutoTokenizer
63
- from peft import PeftModel
64
-
65
- base_model_id = "NaviGen-stage2-base"
66
- adapter_id = "NaviGen-grpo-step600"
67
-
68
- tokenizer = AutoTokenizer.from_pretrained(adapter_id, trust_remote_code=True)
69
- base_model = AutoModelForCausalLM.from_pretrained(
70
- base_model_id,
71
- torch_dtype="auto",
72
- device_map="auto",
73
- trust_remote_code=True,
74
- )
75
- model = PeftModel.from_pretrained(base_model, adapter_id)
76
- model.eval()
77
- ```
78
-
79
- Replace `base_model_id` and `adapter_id` with the final repository names used in your release.
80
-
81
- ## Input Format
82
-
83
- The adapter follows the NaviGen training format. Inputs should use the same tokenizer and special tokens released with this checkpoint. In general, prompts contain user history, item identifiers, and task instructions serialized in the NaviGen token stream.
84
-
85
- For reproducibility, use the tokenizer files included in this repository:
86
-
87
- - `tokenizer.json`
88
- - `tokenizer_config.json`
89
- - `special_tokens_map.json`
90
- - `added_tokens.json`
91
- - `chat_template.jinja`
92
- - `vocab.json`
93
- - `merges.txt`
94
-
95
- ## Training Summary
96
-
97
- NaviGen uses a two-stage SFT + RL pipeline:
98
-
99
- 1. **Stage-1 SFT:** learns item identifier and preference-aware representations.
100
- 2. **Stage-2 SFT:** distills preference reasoning and instruction writing from searched supervision.
101
- 3. **GRPO alignment:** optimizes the model with hierarchical and self-consistent rewards to better match user intent and generation quality.
102
-
103
- This checkpoint corresponds to the GRPO adapter saved at training step 600.
104
-
105
- ## Limitations
106
-
107
- - The adapter depends on the matching NaviGen base model and tokenizer.
108
- - Outputs are sensitive to the exact prompt format and identifier vocabulary.
109
- - The model is designed for research use and has not been audited for all production safety requirements.
110
- - Generated instructions may still contain irrelevant, underspecified, or visually difficult content.
111
-
112
- ## Files
113
-
114
- Core files for inference:
115
-
116
- - `adapter_config.json`
117
- - `adapter_model.safetensors`
118
- - tokenizer and chat template files
119
-
120
- Training-resume states such as optimizer or scheduler checkpoints are not required for normal inference.
121
-
122
- ## Citation
123
-
124
- If you use this model, please cite the NaviGen paper once the citation is released.
125
-
126
- ```bibtex
127
- @article{navigen,
128
- title = {NaviGen: Personalized Generative Recommendation with Dual Identifiers},
129
- author = {NaviGen Authors},
130
- journal = {TBA},
131
- year = {2026}
132
- }
133
- ```
 
 
 
1
+ ---
2
+ base_model: NaviGen-stage2-base
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - navigen
7
+ - grpo
8
+ - lora
9
+ - peft
10
+ - qwen3
11
+ - transformers
12
+ - trl
13
+ - unsloth
14
+ ---
15
+
16
+ # NaviGen GRPO Adapter - step600
17
+
18
+ This repository contains the GRPO-trained LoRA adapter used by **NaviGen**, as presented in the paper [Navigating User Behavior toward Personalized Multimodal Generation](https://huggingface.co/papers/2606.24196).
19
+
20
+ The official code is available at the [NaviGen GitHub Repository](https://github.com/iLearn-Lab/NaviGen).
21
+
22
+ NaviGen is a personalized generative recommendation model for producing user-aware image and video generation instructions. It represents each item with a dual identifier that couples a collaborative code and a textual code in one token stream. This adapter is the reinforcement learning stage of the NaviGen pipeline: it further aligns the stage-2 supervised model with user intent through reward-guided optimization.
23
+
24
+ ## Model Details
25
+
26
+ - **Model name:** NaviGen GRPO Adapter, step600
27
+ - **Model type:** PEFT LoRA adapter for causal language modeling
28
+ - **Base model:** `NaviGen-stage2-base`
29
+ - **Backbone family:** Qwen3-style causal LM
30
+ - **Training stage:** GRPO reinforcement learning after two-stage SFT
31
+ - **Adapter format:** `adapter_model.safetensors`
32
+ - **PEFT version:** 0.19.1
33
+
34
+ The adapter targets the main attention and MLP projection layers:
35
+
36
+ ```text
37
+ q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
38
+ ```
39
+
40
+ ## Intended Use
41
+
42
+ This adapter is intended for research on personalized generative recommendation, especially settings where a model should infer user preference from historical item identifiers and produce more specific, relevant, and visually generatable generation instructions.
43
+
44
+ Typical uses include:
45
+
46
+ - Personalized prompt or instruction generation for image/video models
47
+ - Next-item or identifier prediction under the NaviGen token format
48
+ - Reproduction and analysis of the NaviGen RL stage
49
+ - Ablation studies comparing SFT and GRPO-aligned checkpoints
50
+
51
+ This adapter is **not** a standalone model. It must be loaded on top of the corresponding NaviGen stage-2 base model.
52
+
53
+ ## Quick Start
54
+
55
+ Install the main dependencies:
56
+
57
+ ```bash
58
+ pip install torch transformers peft safetensors
59
+ ```
60
+
61
+ Load the adapter with PEFT:
62
+
63
+ ```python
64
+ from transformers import AutoModelForCausalLM, AutoTokenizer
65
+ from peft import PeftModel
66
+
67
+ base_model_id = "NaviGen-stage2-base"
68
+ adapter_id = "NaviGen-grpo-step600"
69
+
70
+ tokenizer = AutoTokenizer.from_pretrained(adapter_id, trust_remote_code=True)
71
+ base_model = AutoModelForCausalLM.from_pretrained(
72
+ base_model_id,
73
+ torch_dtype="auto",
74
+ device_map="auto",
75
+ trust_remote_code=True,
76
+ )
77
+ model = PeftModel.from_pretrained(base_model, adapter_id)
78
+ model.eval()
79
+ ```
80
+
81
+ Replace `base_model_id` and `adapter_id` with the final repository names used in your release.
82
+
83
+ ## Input Format
84
+
85
+ The adapter follows the NaviGen training format. Inputs should use the same tokenizer and special tokens released with this checkpoint. In general, prompts contain user history, item identifiers, and task instructions serialized in the NaviGen token stream.
86
+
87
+ For reproducibility, use the tokenizer files included in this repository:
88
+
89
+ - `tokenizer.json`
90
+ - `tokenizer_config.json`
91
+ - `special_tokens_map.json`
92
+ - `added_tokens.json`
93
+ - `chat_template.jinja`
94
+ - `vocab.json`
95
+ - `merges.txt`
96
+
97
+ ## Training Summary
98
+
99
+ NaviGen uses a two-stage SFT + RL pipeline:
100
+
101
+ 1. **Stage-1 SFT:** learns item identifier and preference-aware representations.
102
+ 2. **Stage-2 SFT:** distills preference reasoning and instruction writing from searched supervision.
103
+ 3. **GRPO alignment:** optimizes the model with hierarchical and self-consistent rewards to better match user intent and generation quality.
104
+
105
+ This checkpoint corresponds to the GRPO adapter saved at training step 600.
106
+
107
+ ## Limitations
108
+
109
+ - The adapter depends on the matching NaviGen base model and tokenizer.
110
+ - Outputs are sensitive to the exact prompt format and identifier vocabulary.
111
+ - The model is designed for research use and has not been audited for all production safety requirements.
112
+ - Generated instructions may still contain irrelevant, underspecified, or visually difficult content.
113
+
114
+ ## Files
115
+
116
+ Core files for inference:
117
+
118
+ - `adapter_config.json`
119
+ - `adapter_model.safetensors`
120
+ - tokenizer and chat template files
121
+
122
+ Training-resume states such as optimizer or scheduler checkpoints are not required for normal inference.
123
+
124
+ ## Citation
125
+
126
+ If you use this model, please cite the NaviGen paper:
127
+
128
+ ```bibtex
129
+ @article{navigen2026,
130
+ title = {Navigating User Behavior toward Personalized Multimodal Generation},
131
+ author = {NaviGen Authors},
132
+ journal = {arXiv preprint arXiv:2606.24196},
133
+ year = {2026}
134
+ }
135
+ ```