Text Generation
Transformers
Safetensors
English
qwen3_5_text
code
codepin
code-localization
repository-search
software-engineering
supervised-fine-tuning
sft
qwen3.5
conversational
Eval Results (legacy)
Instructions to use LeeXugar/CodePin-SFT-Qwen3.5-0.8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LeeXugar/CodePin-SFT-Qwen3.5-0.8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LeeXugar/CodePin-SFT-Qwen3.5-0.8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LeeXugar/CodePin-SFT-Qwen3.5-0.8B") model = AutoModelForCausalLM.from_pretrained("LeeXugar/CodePin-SFT-Qwen3.5-0.8B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LeeXugar/CodePin-SFT-Qwen3.5-0.8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LeeXugar/CodePin-SFT-Qwen3.5-0.8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeeXugar/CodePin-SFT-Qwen3.5-0.8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LeeXugar/CodePin-SFT-Qwen3.5-0.8B
- SGLang
How to use LeeXugar/CodePin-SFT-Qwen3.5-0.8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LeeXugar/CodePin-SFT-Qwen3.5-0.8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeeXugar/CodePin-SFT-Qwen3.5-0.8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LeeXugar/CodePin-SFT-Qwen3.5-0.8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeeXugar/CodePin-SFT-Qwen3.5-0.8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LeeXugar/CodePin-SFT-Qwen3.5-0.8B with Docker Model Runner:
docker model run hf.co/LeeXugar/CodePin-SFT-Qwen3.5-0.8B
Link CodePin collection and add publication report
Browse files- README.md +4 -2
- training/README.md +1 -1
- training/huggingface_publish_report.json +43 -0
README.md
CHANGED
|
@@ -39,6 +39,8 @@ model-index:
|
|
| 39 |
|
| 40 |
CodePin 面向大型代码仓库中的**代码定位与仓库搜索**:模型学习以纯文本工具轨迹逐步缩小搜索空间,最终给出与任务相关的文件、类和函数位置。本仓库发布基于 `Qwen/Qwen3.5-0.8B` 的全参数 SFT 权重,以及可复核训练过程的逐步指标、配置、验证报告和论文风格图像。
|
| 41 |
|
|
|
|
|
|
|
| 42 |
> **命名说明**:`0.8B` 表示基座型号。训练框架在 FSDP 导出时将 token embedding 与 LM head 物化为两组独立且均已训练的张量;本仓库保留两者并在配置中明确设置 `tie_word_embeddings=false`。因此实际可加载参数量为 `1,006,672,704`,而不是严格的 0.8B tied-weight 参数计数。这样做忠实保留了本次训练得到的状态,没有覆盖或丢弃任一矩阵。
|
| 43 |
|
| 44 |
## 模型概要
|
|
@@ -243,7 +245,8 @@ V100 是 SM70,许多基于现代 Triton 的 fused cross-entropy 实现只覆
|
|
| 243 |
├── sft_training_metrics.csv
|
| 244 |
├── sft_training_summary.json
|
| 245 |
├── final_hf_validation.json
|
| 246 |
-
|
|
|
|
| 247 |
```
|
| 248 |
|
| 249 |
`sft_training_metrics.csv` 包含完整 710 steps,每行字段包括 loss、gradient norm、padded length、actual tokens、padding efficiency、tokens/s/GPU、step-time breakdown、连续重建 token 计数、重建 LR 和训练阶段。详见 [`training/README.md`](training/README.md)。
|
|
@@ -274,4 +277,3 @@ V100 是 SM70,许多基于现代 Triton 的 fused cross-entropy 实现只覆
|
|
| 274 |
## License
|
| 275 |
|
| 276 |
模型权重继承 Qwen3.5 基座的 [Apache License 2.0](https://huggingface.co/Qwen/Qwen3.5-0.8B/blob/main/LICENSE)。训练过程说明、绘图脚本及 CodePin 项目代码同时受各自仓库中声明的许可证约束。使用者仍需遵守训练数据来源和适用法律要求。
|
| 277 |
-
|
|
|
|
| 39 |
|
| 40 |
CodePin 面向大型代码仓库中的**代码定位与仓库搜索**:模型学习以纯文本工具轨迹逐步缩小搜索空间,最终给出与任务相关的文件、类和函数位置。本仓库发布基于 `Qwen/Qwen3.5-0.8B` 的全参数 SFT 权重,以及可复核训练过程的逐步指标、配置、验证报告和论文风格图像。
|
| 41 |
|
| 42 |
+
**CodePin 归档:** [Hugging Face Collection](https://huggingface.co/collections/LeeXugar/codepin-6a8afa1064d9f83f9fce2982) · [教师 SFT 数据集](https://huggingface.co/datasets/LeeXugar/CodePin-SFT-Qwen3.5-35B-A3B) · [SWE-smith code-search 数据](https://huggingface.co/datasets/LeeXugar/SWE-smith-code-search)
|
| 43 |
+
|
| 44 |
> **命名说明**:`0.8B` 表示基座型号。训练框架在 FSDP 导出时将 token embedding 与 LM head 物化为两组独立且均已训练的张量;本仓库保留两者并在配置中明确设置 `tie_word_embeddings=false`。因此实际可加载参数量为 `1,006,672,704`,而不是严格的 0.8B tied-weight 参数计数。这样做忠实保留了本次训练得到的状态,没有覆盖或丢弃任一矩阵。
|
| 45 |
|
| 46 |
## 模型概要
|
|
|
|
| 245 |
├── sft_training_metrics.csv
|
| 246 |
├── sft_training_summary.json
|
| 247 |
├── final_hf_validation.json
|
| 248 |
+
├── apex_xentropy_sm70_validation.json
|
| 249 |
+
└── huggingface_publish_report.json
|
| 250 |
```
|
| 251 |
|
| 252 |
`sft_training_metrics.csv` 包含完整 710 steps,每行字段包括 loss、gradient norm、padded length、actual tokens、padding efficiency、tokens/s/GPU、step-time breakdown、连续重建 token 计数、重建 LR 和训练阶段。详见 [`training/README.md`](training/README.md)。
|
|
|
|
| 277 |
## License
|
| 278 |
|
| 279 |
模型权重继承 Qwen3.5 基座的 [Apache License 2.0](https://huggingface.co/Qwen/Qwen3.5-0.8B/blob/main/LICENSE)。训练过程说明、绘图脚本及 CodePin 项目代码同时受各自仓库中声明的许可证约束。使用者仍需遵守训练数据来源和适用法律要求。
|
|
|
training/README.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
| 10 |
- `sft_training_summary.json`:聚合统计、关键 batch 与证据边界。
|
| 11 |
- `final_hf_validation.json`:最终 HF 权重加载、参数完整性与生成验证。
|
| 12 |
- `apex_xentropy_sm70_validation.json`:独立 SM70 fused CE 候选的构建和数值验证摘要。
|
|
|
|
| 13 |
|
| 14 |
## CSV 字段
|
| 15 |
|
|
@@ -37,4 +38,3 @@
|
|
| 37 |
- 失败重试中重复出现的 step 不进入 CSV;
|
| 38 |
- 原 trainer 的 token counter 在 resume 时清零,因此完整 token 总量由逐步 `actual_tokens` 求和重建;
|
| 39 |
- 原日志没有逐步 LR、GPU memory 或 utilization,缺失指标不会被推断或伪造。
|
| 40 |
-
|
|
|
|
| 10 |
- `sft_training_summary.json`:聚合统计、关键 batch 与证据边界。
|
| 11 |
- `final_hf_validation.json`:最终 HF 权重加载、参数完整性与生成验证。
|
| 12 |
- `apex_xentropy_sm70_validation.json`:独立 SM70 fused CE 候选的构建和数值验证摘要。
|
| 13 |
+
- `huggingface_publish_report.json`:Hub revision、各阶段提交和已发布文件清单。
|
| 14 |
|
| 15 |
## CSV 字段
|
| 16 |
|
|
|
|
| 38 |
- 失败重试中重复出现的 step 不进入 CSV;
|
| 39 |
- 原 trainer 的 token counter 在 resume 时清零,因此完整 token 总量由逐步 `actual_tokens` 求和重建;
|
| 40 |
- 原日志没有逐步 LR、GPU memory 或 utilization,缺失指标不会被推断或伪造。
|
|
|
training/huggingface_publish_report.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "PASS",
|
| 3 |
+
"repo_id": "LeeXugar/CodePin-SFT-Qwen3.5-0.8B",
|
| 4 |
+
"repo_url": "https://huggingface.co/LeeXugar/CodePin-SFT-Qwen3.5-0.8B",
|
| 5 |
+
"collection": "LeeXugar/codepin-6a8afa1064d9f83f9fce2982",
|
| 6 |
+
"collection_url": "https://huggingface.co/collections/LeeXugar/codepin-6a8afa1064d9f83f9fce2982",
|
| 7 |
+
"identity": "LeeXugar",
|
| 8 |
+
"private": false,
|
| 9 |
+
"pipeline_tag": "text-generation",
|
| 10 |
+
"revision": "1cd2d00a47373310c822ec597883cbbcaa90d5c3",
|
| 11 |
+
"published_files": [
|
| 12 |
+
".gitattributes",
|
| 13 |
+
"LICENSE",
|
| 14 |
+
"README.md",
|
| 15 |
+
"assets/fig_sft_length_efficiency.pdf",
|
| 16 |
+
"assets/fig_sft_length_efficiency.png",
|
| 17 |
+
"assets/fig_sft_training_dynamics.pdf",
|
| 18 |
+
"assets/fig_sft_training_dynamics.png",
|
| 19 |
+
"chat_template.jinja",
|
| 20 |
+
"config.json",
|
| 21 |
+
"generation_config.json",
|
| 22 |
+
"model.safetensors",
|
| 23 |
+
"scripts/gen_fig_sft_training_dynamics.py",
|
| 24 |
+
"tokenizer.json",
|
| 25 |
+
"tokenizer_config.json",
|
| 26 |
+
"training/README.md",
|
| 27 |
+
"training/apex_xentropy_sm70_validation.json",
|
| 28 |
+
"training/data_filter_summary.json",
|
| 29 |
+
"training/final_hf_validation.json",
|
| 30 |
+
"training/sft_training_metrics.csv",
|
| 31 |
+
"training/sft_training_summary.json",
|
| 32 |
+
"training/training_config.json"
|
| 33 |
+
],
|
| 34 |
+
"model_safetensors_bytes": 4026732464,
|
| 35 |
+
"model_safetensors_sha256_local_preupload": "d97009d9e41838a2eb8ce0e6275ac41cf80f1186915628f31662d3ba0b67e48e",
|
| 36 |
+
"commits": {
|
| 37 |
+
"metadata": "93fc4c9d8ee340a452f17e6deee287f57ae58246",
|
| 38 |
+
"license": "e8d2d7014247df1740164cd2f8d7e1176cdfab22",
|
| 39 |
+
"model_config": "8cc0a995eac1f696b31696e17e053a6d1653883b",
|
| 40 |
+
"weight": "1cd2d00a47373310c822ec597883cbbcaa90d5c3"
|
| 41 |
+
},
|
| 42 |
+
"verified_at_unix": 1787581361.614298
|
| 43 |
+
}
|