--- library_name: transformers license: other license_name: qwen-research license_link: LICENSE base_model: Qwen/Qwen2.5-Coder-3B base_model_relation: finetune pipeline_tag: text-generation tags: - code - code-translation - cleartrans - sft - qwen2 - llama-factory --- # ClearTrans 3B SFT: C++ to Java Built with Qwen. This repository releases a full, direction-specific supervised fine-tuning (SFT) checkpoint based on [Qwen/Qwen2.5-Coder-3B](https://huggingface.co/Qwen/Qwen2.5-Coder-3B). Its translation direction is **C++ to Java**. ## Release scope This checkpoint is provided as part of the ClearTrans artifact release. The available checkpoint metadata identifies the training stage as SFT. It does not establish that this is a final GRPO-trained checkpoint, and no specific manuscript benchmark score is attributed to this checkpoint here. The release has passed file-size, tensor-layout, and shard-index checks; GPU inference and benchmark reproduction have not been validated for this release. Implementation and replication scripts: [https://github.com/Xingzhehu/ClearTrans](https://github.com/Xingzhehu/ClearTrans). ## Loading The training metadata records Transformers 4.57.1 and PyTorch 2.9.1. Use a compatible Transformers version and an environment suitable for the hardware. ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "fdsffjdkf/ClearTrans-3B-SFT-Cpp-to-Java" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype="auto", device_map="auto" ) model.eval() ``` The tokenizer and the checkpoint's chat template are included. For reproduction, use the original task prompt and decoding configuration for the experiment being reproduced. The loading example alone does not specify a benchmark protocol. ## Training metadata The following settings are copied from the checkpoint's training-generated model card. They document the supplied checkpoint rather than a newly executed training run. - learning_rate: 1e-05 - train_batch_size: 1 - eval_batch_size: 8 - seed: 42 - distributed_type: multi-GPU - num_devices: 8 - gradient_accumulation_steps: 8 - total_train_batch_size: 64 - total_eval_batch_size: 64 - optimizer: Use adamw_torch_fused with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: cosine - num_epochs: 3.0 The original card identifies a direction-specific `train_full_1231_cpp2java_idx3` dataset. Training examples are not included in this model repository; its name alone does not verify the dataset provenance or reconstruction procedure. ## Limitations Generated translations can contain functional errors and code smells. Evaluate outputs with the intended tests and analysis tools before relying on them. This repository does not include training data, optimizer states, or historical evaluation outputs. It is a weight release, not evidence of full numerical reproduction of all reported experiments. ## License and changes The weights are released under the upstream **Qwen Research License Agreement**, included in [LICENSE](LICENSE), for non-commercial research or evaluation in accordance with that agreement. They are not relicensed under MIT or Apache-2.0. See [NOTICE](NOTICE) for attribution and the statement of modifications. The model weights were modified by full supervised fine-tuning of the upstream Qwen2.5-Coder-3B model. The supplied configuration and tokenizer files are retained from the training export; this release replaces the automatically generated model card and adds release documentation, the upstream license, and attribution notices.