DUTAOZHANG commited on
Commit
8f0de5b
·
verified ·
1 Parent(s): 0a7ac83

Update README.md

Browse files

Here’s the full usage note for your Hugging Face weight page and to integrate with the GitHub README:

📦 Model Weights Usage

This repository hosts two separate model weights that need to be used together for full functionality:

✅ Style Encoder Checkpoint (first stage):Trained with contrastive learning to extract explicit style embeddings.

✅ Flan-T5 Generator Checkpoint (second stage):Fine-tuned to generate code while incorporating the style embeddings.

To use these weights:

1️⃣ Clone the Style2Code repository:

git clone https://github.com/zh19980811/Style2Code.git
cd Style2Code

2️⃣ Modify the file paths in run.py, train_stage1/train_stage1.py, and train_stage2/run_ddp.sh to point to the correct weight files.

3️⃣ Use the provided scripts to load the style encoder and the Flan-T5 generator together for either inference or further fine-tuning.

ℹ️ The weights must be used together, as they are complementary:The style encoder extracts style embeddings, and the generator (Flan-T5) conditions on these embeddings for style-controlled code generation.

For more details, please refer to the Style2Code GitHub repository.

Files changed (1) hide show
  1. README.md +5 -0
README.md CHANGED
@@ -1,4 +1,9 @@
1
  ---
2
  base_model:
3
  - google/flan-t5-large
 
 
 
 
 
4
  ---
 
1
  ---
2
  base_model:
3
  - google/flan-t5-large
4
+ license: apache-2.0
5
+ metrics:
6
+ - bleu
7
+ tags:
8
+ - code
9
  ---