five

darkproger/flores-uk-beams

收藏
Hugging Face2024-01-13 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/darkproger/flores-uk-beams
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: mit task_categories: - translation language: - uk - en size_categories: - n<1K --- This is a dataset of translation variants generated for `load_dataset("facebook/flores", "eng_Latn-ukr_Cyrl")["dev"]` using [mistralai/Mistral-7B-v0.1](https://docs.mistral.ai/self-deployment/vllm/). Data was generated using the following script: ```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, #"temperature": 1.0, #"top_p": 0.001, #"top_k": 40, "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)) ``` Quickly run vllm locally using: ``` docker run --gpus all -p 8000:8000 -e HF_HOME=/hf -e CUDA_VISIBLE_DEVICES=0 -v ~/.cache/huggingface:/hf \ ghcr.io/mistralai/mistral-src/vllm:latest --host 0.0.0.0 --model mistralai/Mistral-7B-v0.1 ```
提供机构:
darkproger
原始信息汇总

数据集概述

许可证

  • 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))

5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作