🚀 FastApply-7B-v1.0
FastApply-7B-v1.0は、即時コード適用のために設計された7Bモデルです。完全なファイル編集を行い、SoftGen AIをサポートします。
🚀 クイックスタート
FastApply-7B-v1.0を使用するには、以下の手順に従ってください。まず、Hugging Face Transformersライブラリを使用してモデルをロードします。
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Kortix/FastApply-7B-v1.0")
tokenizer = AutoTokenizer.from_pretrained("Kortix/FastApply-7B-v1.0")
input_text = """<|im_start|>system
You are a coding assistant that helps merge code updates, ensuring every modification is fully integrated.<|im_end|>
<|im_start|>user
Merge all changes from the <update> snippet into the <code> below.
- Preserve the code's structure, order, comments, and indentation exactly.
- Output only the updated code, enclosed within <updated-code> and </updated-code> tags.
- Do not include any additional text, explanations, placeholders, ellipses, or code fences.
<code>{original_code}</code>
<update>{update_snippet}</update>
Provide the complete updated code.<|im_end|>
<|im_start|>assistant
"""
input_text = input_text.format(
original_code=original_code,
update_snippet=update_snippet,
).strip()
input_ids = tokenizer.encode(input_text, return_tensors="pt")
output = model.generate(input_ids, max_length=8192,)
response = tokenizer.decode(output[0][len(input_ids[0]):])
print(response)
updated_code = response.split("<updated-code>")[1].split("</updated-code>")[0]
✨ 主な機能
モデルの基本情報
モデルの説明
FastApply-7B-v1.0は、即時コード適用のために設計された7Bモデルで、完全なファイル編集を行い、SoftGen AIをサポートします。このモデルは、Qwen2.5 Coderモデルのデータ生成とファインチューニングのためのFast Applyパイプラインの一部です。
このモデルは、Fireworksのような高速なプロバイダー上にデプロイされた場合、高いスループットを達成し、約150トークン/秒の速度で、高い編集精度を維持します。
想定される使用方法
FastApply-7B-v1.0は、高速かつ正確なコード変更を必要とするAI搭載のコードエディタやツールでの使用を想定しています。特に以下の用途に適しています。
- 即時コード適用タスク
- 完全なファイル編集
- AiderやPearAIのようなAI搭載のコードエディタとの統合
- 最先端モデルの出力コストを削減するためのローカルツール
推論テンプレート
FastApply-7B-v1.0は、Qwen2.5 Coderアーキテクチャに基づいており、コード編集タスクに対してファインチューニングされています。推論には特定のプロンプト構造を使用します。
<|im_start|>system
You are a coding assistant that helps merge code updates, ensuring every modification is fully integrated.<|im_end|>
<|im_start|>user
Merge all changes from the <update> snippet into the <code> below.
- Preserve the code's structure, order, comments, and indentation exactly.
- Output only the updated code, enclosed within <updated-code> and </updated-code> tags.
- Do not include any additional text, explanations, placeholders, ellipses, or code fences.
<code>{original_code}</code>
<update>{update_snippet}</update>
Provide the complete updated code.<|im_end|>
<|im_start|>assistant
モデルの出力は以下のように構成されます。
<updated-code>[Full-complete updated file]</updated-code>
追加情報
Fast Applyパイプライン、データ生成プロセス、およびデプロイメント手順の詳細については、GitHubリポジトリを参照してください。
評価

関連リンク
📄 ライセンス
このモデルは、apache-2.0ライセンスの下で提供されています。