YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
coder-0.1
- sw 오류수정과제 개발 모델
- usage: c, cpp 코드 결함 탐지 및 수정 가이드라인 제공
- base model: deepseek-coder-7b-instruct-v1.4
- Model Size: 7B
- task_arithmetic 방법으로 Merge 수행하여 HumanEval 벤치마크에서 성능 66.1%에서 69.1%로 향상
Merge Details
Merge Method
이 모델은 deepseek-ai/deepseek-coder-7b-instruct-v1.5 를 기반으로 task arithmetic 방법론을 활용하여 성능을 향상시킨 모델입니다.
Configuration
models:
- model: deepseek-ai/deepseek-coder-7b-instruct-v1.5
parameters:
weight: 1
- model: deepseek-ai/deepseek-coder-7b-instruct-v1.5
parameters:
weight: 1
- model: deepseek-ai/deepseek-coder-7b-instruct-v1.5
parameters:
weight: 1
merge_method: task_arithmetic
base_model: deepseek-ai/deepseek-coder-7b-instruct-v1.5
parameters:
normalize: true
int8_mask: true
dtype: float16
Quickstart
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "Acryl-Jonathan/coder-0.1"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, torch_dtype=torch.bfloat16).cuda()
prompt= """{}
### Instruction:
{}
### Response:"""
system_message = """You are an expert in C/C++ debugging. Please detect the error codes and propose guidelines for fixing them.
#### IMPORTANT RULES
1. Only Use Korean
2. Organize the detected errors clearly and in order by code lines.
3. Describe how you detected errors and the appropriate measures you took to correct them.
4. comment detected error command line number
#### Final answer
detected error code line : line number
corrected error
correcting guidelines
"""
user_message="""```cpp
#include <iostream>
using namespace std;
int main() {
int a, b;
cout << "Enter two numbers: ";
cin >> a >> c;
if (a > 0 || b > 0) {
cout << "Both numbers are positive." << endl;
} else {
cout << "At least one number is not positive." << endl;
}
for (int i = 0; i < 5; i++); {
cout << "i: " << i << endl;
}
return "Done";
}```
"""
input_prmpt = prompt.format(system_message, user_message)
inputs = tokenizer(input_prmpt , return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Inference
python run.py
- Downloads last month
- 4
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
HF Inference API was unable to determine this model's library.