Yangfan78 commited on
Commit
5d7313f
·
verified ·
1 Parent(s): 59af10d

Translate model card to English

Browse files
Files changed (1) hide show
  1. README.md +49 -79
README.md CHANGED
@@ -7,118 +7,90 @@ tags:
7
  - lora
8
  ---
9
 
10
- # 3D_LLM_Diffusion — 模型权重
11
 
12
- 本仓库只存放权重文件。代码与使用文档:https://github.com/Richardyangfan78/3D_LLM_Diffusion
13
 
14
  ```bash
15
  hf download Yangfan78/3D_LLM_Diffusion --local-dir weights
16
  ```
17
 
18
- 三组互相独立的权重,可按需单独下载。
19
 
20
  ---
21
 
22
- ## 1. `generator_v41/` — 条件晶体生成器
23
 
24
- | 文件 | 大小 | 内容 |
25
  |---|---:|---|
26
- | `best.pt` | 378.9 MB | 生成器全部权重。**含基座主干**,加载时不需要额外的底座文件 |
27
- | `priors/train.csv` | 75.2 MB | 采样时读取:原子数分布先验 + 允许元素集合 |
28
- | `priors/val.csv` | 25.0 MB | 验证集划分 |
29
- | `eval/` | — | 四份评测记录,见下 |
30
 
31
- **权重规格**
32
-
33
- | 项 | 值 |
34
  |---|---|
35
- | 架构标识 | `mattergen-spacegroup-hhi-qwen-crossattention-crystalite-v8` |
36
- | 参数量 | 94.63 M777 个张量)|
37
- | 维度 | d_model 512 / 14 / 16 |
38
- | 训练步数 | 6000 |
39
- | 原子类型编码 | `subatomic_tokenizer_pca_16`16 维连续向量)|
40
- | 晶格表示 | `ltri` |
41
  | SHA-256 | `cd67729bd862537be9113146ebdf48db81f86a53a4a32cd99c751bba0e06fa4a` |
42
 
43
- **参数构成**
44
-
45
- | 模块 | 参数 | 占比 |
46
- |---|---:|---:|
47
- | 去噪主干(14 层 Transformer) | 66.17 M | 69.9% |
48
- | 文本交叉注意力 | 14.74 M | 15.6% |
49
- | 逐层 FiLM 条件调制 | 3.67 M | 3.9% |
50
- | 分路由低秩适配器 | 3.21 M | 3.4% |
51
- | 条件编码器(元素/物性/空间群/文本) | 5.10 M | 5.4% |
52
- | 输入嵌入与输出头 | 1.74 M | 1.8% |
53
-
54
- **权重内固化的条件配置**
55
 
56
- 支持 8 个条件通道:`chemical_system`、`space_group`、`dft_band_gap`、`dft_bulk_modulus`、`dft_mag_density`、`energy_above_hull`、`hhi_score`、`ml_bulk_modulus`。
57
-
58
- 推理策略与采样参数已写入 checkpoint,加载后自动生效:
59
 
60
  ```
61
- 引导强度 全局 1.0 | band_gap 1.5 | e_above_hull 2.0 | 元素+hull 联合 2.25
62
- 采样器 150 步,σ 0.00280rho 7S_churn 60
63
  ```
64
 
65
- **`eval/` 内的记录**
66
-
67
- | 文件 | 内容 |
68
- |---|---|
69
- | `mattergen_capabilities.json` | 8 个条件通道 + 4 个联合反事实,每场景 n=512,14/14 项通过 |
70
- | `zero_condition_parity.json` | 条件置零时与无条件基座逐比特一致(170 个张量,差值全为 0)|
71
- | `policy_pin_audit.json` | 推理策略固化审计,777 个张量逐一校验 |
72
- | `text_control_eval/` | 文本条件对照实验记录 |
73
-
74
  ---
75
 
76
- ## 2. `text_conditioning/` — 文本条件向量与编码器
77
 
78
- | 文件 | 大小 | 内容 |
79
  |---|---:|---|
80
- | `val_text_xrd_z.pt` | 22.1 MB | **18094 条预编码向量**,每条 256 |
81
- | `trimodal_best.pt` | 51.4 MB | 晶体-文本-XRD 三模态编码器 |
82
- | `qwen_latent_adapter_best.pt` | 9.5 MB | Qwen 隐状态 256 维向量的适配器 |
83
- | `val_text_xrd_z.pt.meta.json` | — | 溯源元数据 |
84
 
85
- `val_text_xrd_z.pt` 是一个 dict,key 格式:
86
 
87
  ```
88
- mp-865981__text 文本模态向量
89
- mp-865981__xrd XRD 模态向量
90
  ```
91
 
92
- 用这些预编码向量做条件生成不需要语言模型。若要编码新文本,则需自备 Qwen3.6-35B-A3Brevision `995ad96eacd98c81ed38be0c5b274b04031597b0`)配合另两个文件使用。
93
 
94
- 三模态编码器 SHA-256`fa5dbe01af4d733022ab2d2a1db0e425414e2148154254931a1acb290029ea94`
95
 
96
  ---
97
 
98
- ## 3. `3D_Property/` — 物性预测模型(LoRA
99
 
100
- Qwen3.6-35B-A3B 之上的外挂权重,**基座本体未包含在此仓库、也未被修改**。
101
 
102
- | 文件 | 大小 | 内容 |
103
  |---|---:|---|
104
- | `step_6500/lora_adapter/` | 613.5 MB | LoRA 权重,PEFT 标准格式 |
105
- | `step_6500/projector.pt` | 18.9 MB | 每原子特征 Qwen 嵌入空间的投影器 |
106
- | `step_6500/trainer_state.pt` | 1265.1 MB | 优化器动量、LR 调度进度、RNG、采样器状态 |
107
- | `step_6500/checkpoint_metadata.json` | — | 训练元数据 |
108
- | `stage1_projector.pt` | 18.9 MB | Stage-1 阶段的投影器 |
109
 
110
- **权重规格**
111
-
112
- | 项 | 值 |
113
  |---|---|
114
- | 基座模型 | Qwen3.6-35B-A3B @ `995ad96eacd98c81ed38be0c5b274b04031597b0` |
115
- | LoRA | r=128alpha=256dropout=0.05 |
116
- | 挂载位置 | 250 个线性层(`q/k/v/o_proj``gate/up/down_proj``in_proj_qkv``in_proj_z``out_proj`|
117
- | 可训练参数 | 153,354,240(约占基座 0.44%|
118
- | 训练进度 | step 6500 / 12000 |
119
- | 参考运行环境 | H200 单卡,显存占用约 105.7 GB,有效 batch 256 |
120
-
121
- **加载 LoRA**
122
 
123
  ```python
124
  from peft import PeftModel
@@ -131,12 +103,10 @@ base = AutoModelForCausalLM.from_pretrained(
131
  model = PeftModel.from_pretrained(base, "weights/3D_Property/step_6500/lora_adapter")
132
  ```
133
 
134
- `projector.pt` 需单独加载以生成每原子软 token;`trainer_state.pt` 仅在继续训练时需要,纯推理可不下载。
135
 
136
  ---
137
 
138
- ## 许可
139
 
140
- - `generator_v41/best.pt` 中的去噪主干部分派生自 Crystalite research backboneMIT License, Copyright (c) 2026 Joshua Rosenthal
141
- - `3D_Property/` 的 LoRA 权重派生自 Qwen3.6-35B-A3B(Apache-2.0)。
142
- - 完整的第三方声明见代码仓库的 `NOTICE`。
 
7
  - lora
8
  ---
9
 
10
+ # 3D_LLM_Diffusion — Model Weights
11
 
12
+ Weights only. Code and usage documentation: https://github.com/Richardyangfan78/3D_LLM_Diffusion
13
 
14
  ```bash
15
  hf download Yangfan78/3D_LLM_Diffusion --local-dir weights
16
  ```
17
 
18
+ Three independent weight sets.
19
 
20
  ---
21
 
22
+ ## `generator_v41/` — Conditional crystal generator
23
 
24
+ | File | Size | Description |
25
  |---|---:|---|
26
+ | `best.pt` | 378.9 MB | All generator weights, backbone included |
27
+ | `priors/train.csv` | 75.2 MB | Read at sampling time: atom-count prior + allowed element set |
28
+ | `priors/val.csv` | 25.0 MB | Validation split |
29
+ | `eval/` | — | Evaluation records |
30
 
31
+ | Property | Value |
 
 
32
  |---|---|
33
+ | Architecture ID | `mattergen-spacegroup-hhi-qwen-crossattention-crystalite-v8` |
34
+ | Parameters | 94.63 M (777 tensors) |
35
+ | Dimensions | d_model 512 / 14 layers / 16 heads |
36
+ | Training step | 6000 |
37
+ | Atom type encoding | `subatomic_tokenizer_pca_16` (16-d continuous) |
38
+ | Lattice representation | `ltri` |
39
  | SHA-256 | `cd67729bd862537be9113146ebdf48db81f86a53a4a32cd99c751bba0e06fa4a` |
40
 
41
+ Eight condition channels: `chemical_system`, `space_group`, `dft_band_gap`, `dft_bulk_modulus`, `dft_mag_density`, `energy_above_hull`, `hhi_score`, `ml_bulk_modulus`.
 
 
 
 
 
 
 
 
 
 
 
42
 
43
+ The inference policy and sampler settings are stored inside the checkpoint and apply automatically:
 
 
44
 
45
  ```
46
+ guidance global 1.0 | band_gap 1.5 | e_above_hull 2.0 | element+hull joint 2.25
47
+ sampler 150 steps, sigma 0.002 to 80, rho 7, S_churn 60
48
  ```
49
 
 
 
 
 
 
 
 
 
 
50
  ---
51
 
52
+ ## `text_conditioning/` — Text condition vectors and encoders
53
 
54
+ | File | Size | Description |
55
  |---|---:|---|
56
+ | `val_text_xrd_z.pt` | 22.1 MB | 18,094 pre-encoded vectors, 256-d each |
57
+ | `trimodal_best.pt` | 51.4 MB | Crystal-text-XRD tri-modal encoder |
58
+ | `qwen_latent_adapter_best.pt` | 9.5 MB | Qwen hidden states to 256-d vector adapter |
59
+ | `val_text_xrd_z.pt.meta.json` | — | Provenance metadata |
60
 
61
+ `val_text_xrd_z.pt` is a dict keyed as:
62
 
63
  ```
64
+ mp-865981__text text modality vector
65
+ mp-865981__xrd XRD modality vector
66
  ```
67
 
68
+ Conditioning on these pre-encoded vectors requires no language model. Encoding new text requires Qwen3.6-35B-A3B (revision `995ad96eacd98c81ed38be0c5b274b04031597b0`) together with the other two files.
69
 
70
+ Tri-modal encoder SHA-256: `fa5dbe01af4d733022ab2d2a1db0e425414e2148154254931a1acb290029ea94`
71
 
72
  ---
73
 
74
+ ## `3D_Property/` — Property prediction (LoRA)
75
 
76
+ Adapter weights on top of Qwen3.6-35B-A3B. The base model is neither included here nor modified.
77
 
78
+ | File | Size | Description |
79
  |---|---:|---|
80
+ | `step_6500/lora_adapter/` | 613.5 MB | LoRA weights, PEFT standard format |
81
+ | `step_6500/projector.pt` | 18.9 MB | Per-atom features to Qwen embedding space |
82
+ | `step_6500/trainer_state.pt` | 1265.1 MB | Optimizer moments, LR schedule, RNG, sampler state |
83
+ | `step_6500/checkpoint_metadata.json` | — | Training metadata |
84
+ | `stage1_projector.pt` | 18.9 MB | Stage-1 projector |
85
 
86
+ | Property | Value |
 
 
87
  |---|---|
88
+ | Base model | Qwen3.6-35B-A3B @ `995ad96eacd98c81ed38be0c5b274b04031597b0` |
89
+ | LoRA | r=128, alpha=256, dropout=0.05 |
90
+ | Attached to | 250 linear layers (`q/k/v/o_proj`, `gate/up/down_proj`, `in_proj_qkv`, `in_proj_z`, `out_proj`) |
91
+ | Trainable parameters | 153,354,240 (~0.44% of base) |
92
+ | Progress | step 6500 / 12000 |
93
+ | Reference environment | H200 single GPU, ~105.7 GB VRAM, effective batch 256 |
 
 
94
 
95
  ```python
96
  from peft import PeftModel
 
103
  model = PeftModel.from_pretrained(base, "weights/3D_Property/step_6500/lora_adapter")
104
  ```
105
 
106
+ `projector.pt` is loaded separately to produce the per-atom soft tokens. `trainer_state.pt` is only needed to resume training and can be skipped for inference.
107
 
108
  ---
109
 
110
+ ## License
111
 
112
+ The denoising trunk inside `generator_v41/best.pt` derives from the Crystalite research backbone, MIT License, Copyright (c) 2026 Joshua Rosenthal. The `3D_Property/` LoRA weights derive from Qwen3.6-35B-A3B (Apache-2.0). Full third-party attribution is in the `NOTICE` file of the code repository.