Downloads · 30 days
15
2% of all-time downloads
JEJUMA/JEJUMA-002
JEJUMA-002 is a text generation model from JEJUMA. Use it when you need the model to write or continue text. The card lists the license as mit.
<img src="https://cdn-uploads.huggingface.co/production/uploads/66ac53d3f202443fb03d5c70/MiejxjzWeKjKJgw13yor5.png" width="50%"
Downloads · 30 days
15
2% of all-time downloads
All-time downloads
620
Public
Parameters
8B
32.1 GB on disk
Likes
9
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
JEJUMA-002는 현재 방언과 표준어간 변경, 방언 탐지 등의 역할을 수행할 수 있습니다.JEJUMA-002를 모델을 훈련하기 위해 약 500만개의 지역방언-서울말 페어 데이터를 수집하고, 그 중 지역방언 잘 들어난 데이터를 평균 15만개씩 총 75만개 선별하였습니다.| 입력 문장 | 자이 폴에 독솔 막 난 거 보난 언 생이우다 |
|---|---|
| 정답 | 재 팔에 닭살이 막 난 거 보니, 추운 모양이다. |
| Upstage Solar 출력 | 그 바위에 뱀이 나타나는 걸 보니까 정말 놀랐다. |
| Naver HCX 출력 | 재의 풀에 독초가 마구 난 것을 보니 어린 소나무입니다. |
| GPT-4o 출력 | 저기 바위에 독사가 막 나타난 걸 보니까 정말 놀랐다. |
| JEJUMA-001 출력 | 재 팔에 닭살이 막 난 거 보니, 추운 모양이다. |
| 입력 문장 | 귤나무에 그냥 가서 너네 아버지좀 찾아와라. |
|---|---|
| 데이터셋 | 미깡낭 경 가심 너네 아방 좀 데령 |
| Upstage Solar 출력 | 귤 나무에 가서 네 아버지를 좀 찾아와. |
| Naver HCX 출력 | 귤낭에 강 느네 아방 좀 데령오라. |
| GPT-4o 출력 | 귤나무에 걍 가서 햄신 아방 좀 찾아와라. |
| JEJUMA-001 출력 | 미깡낭 경 가심 너네 아방 좀 촞아오라. |
dialect_to_standard, standard_to_dialect, detect_dialect, detect_dialect_and_convert 중 하나를 사용할 수 있습니다.dialect_to_standard: 방언을 표준어로 변경standard_to_dialect: 표준어를 방언으로 변경detect_dialect: 방언 종류 감지detect_dialect_and_convert: 자동으로 방언종류를 감지하여 표준어로 변경import transformers
import torch
model_id = "JEJUMA/JEJUMA-002"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
terminators = [
pipeline.tokenizer.eos_token_id,
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
class DialectPromptTemplate:
@staticmethod
def dialect_to_standard(text, region):
return [{"role":"user", "content":f"Convert the following sentence or word which is {region}'s dialect to standard Korean: " + text},]
@staticmethod
def standard_to_dialect(text, region):
return [{"role":"user", "content":f"Convert the following sentence or word which is standard Korean to {region}'s dialect: " + text},]
@staticmethod
def detect_dialect(text):
return [{"role":"user", "content":"Detect the following sentence or word is standard, jeju, chungcheong, gangwon, gyeongsang, or jeonla's dialect: " + text},]
@staticmethod
def detect_dialect_and_convert(text):
return [{"role":"user", "content":"Detect the following sentence or word is which dialect and convert the following sentence or word to standard Korean:" + text},]
outputs = pipeline(
DialectPromptTemplate.dialect_to_standard("자이 폴에 독솔 막 난 거 보난 언 생이우다", "jeju"),
max_new_tokens=512,
eos_token_id=terminators,
do_sample=True,
temperature=0.1,
top_p=0.9,
)
print(outputs[0]["generated_text"][-1])