--- license: mit base_model: zai-org/GLM-4.7-Flash library_name: peft pipeline_tag: text-generation datasets: - TokenBender/glm47-pie-cpp-posttraining-data tags: - glm - lora - sft - code - code-optimization - h100 --- # GLM-4.7-Flash PIE C++ SFT LoRA LoRA rank-16 supervised fine-tuning adapter for [`zai-org/GLM-4.7-Flash`](https://huggingface.co/zai-org/GLM-4.7-Flash), trained on the PIE C++ performance task. ## Result The full 1,259-task evaluation produced: | Metric | Result | | --- | ---: | | Pass rate | 90.79% | | Valid format rate | 97.70% | | Correct and faster rate | 28.36% | | Mean speedup when correct and faster | 1.43x | | Mean reward | 0.8980 | | Timeout rate | 0.00% | The complete per-task records and generated responses are under `evidence/eval/`. ## Training Profile | Setting | Value | | --- | --- | | Accelerators | 8x NVIDIA H100 | | Parallelism | TP4 / PP1 / EP8 | | Sequence length | 4,096 | | Max tokens per GPU | 24,576 | | Global batch size | 32 | | LoRA rank / alpha | 16 / 32 | | Peak allocated memory | 36,039 MiB per GPU | | Checkpoint | Step 244 | ## Files - `adapter_model.bin` and `adapter_config.json`: loadable PEFT adapter. - `adapter_megatron_tp*_pp0.pt`: four Megatron tensor-parallel shards. - `training_state_rank*.pt`: per-rank training state. - `evidence/training/`: run receipt and VRAM trace. - `evidence/eval/`: complete evaluation summaries, records, and generations. ## Loading ```python from peft import PeftModel from transformers import AutoModelForCausalLM base = AutoModelForCausalLM.from_pretrained( "zai-org/GLM-4.7-Flash", trust_remote_code=True, ) model = PeftModel.from_pretrained( base, "TokenBender/glm47-flash-pie-cpp-lora-r16-sft-h100", ) ``` Training code: [TokenBender/browser-is-all-you-need](https://github.com/tokenbender/browser-is-all-you-need/tree/client/glm47-h100-posttraining)