darkproger/flores-uk-beams
收藏数据集概述
许可证
- MIT许可证
任务类别
- 翻译
语言
- 乌克兰语 (uk)
- 英语 (en)
数据集大小
- 样本数量小于1000 (n<1K)
数据生成
- 数据集是通过使用
mistralai/Mistral-7B-v0.1模型对load_dataset("facebook/flores", "eng_Latn-ukr_Cyrl")["dev"]生成的翻译变体。 - 数据生成脚本如下:
python import sys import requests import json
context = """[INST] They are planning to host a party next weekend. [/INST] Вони планують провести вечірку наступного вікенду. [INST] I enjoy swimming in the ocean and feeling the salty breeze. [/INST] Мені подобається плавати в океані та відчувати солоний вітер. [INST]"""
def prompt(input, url="http://localhost:8000/v1/completions"): data = { "prompt": f"{context} {input} [/INST]", "stop": "[INST]", "max_tokens": 512, "temperature": 0, "model": "mistralai/Mistral-7B-v0.1", "presence_penalty": 0.1, "use_beam_search": True, "n": 25, "logprobs": 1, } headers = { "Content-Type": "application/json" } response = requests.post(url, headers=headers, data=json.dumps(data)) result = response.json() return result
for line in sys.stdin: text = prompt(line.strip()) print(json.dumps(text, ensure_ascii=False))



