亮数据:高服从数据采集,加速大模型练习!

打印 上一主题 下一主题

主题 831|帖子 831|积分 2493

亮数据,适合大模型数据准备的可视化高服从数据采集工具。
一、大模型练习需要数据

大模型数据处置惩罚的流程,分为数据采集、数据清洗、数据评估和指令数据标注四个主要阶段,而这些阶段中最紧张的就是数据采集阶段,需要海量的数据才能让大模型涌现智能。
访问点击:   亮数据加速数据采集。

数据采集

涉及多种数据源,包括点云、图像、文本和语音,数据来源涵盖公开数据集、百科数据、电子书、Common Crawl数据集、新闻数据和行业数据。
数据清洗

通过结合专家知识、大数据和AI,实现一键数据清洗,步骤包括数据去重、网页语言过滤、特殊符号过滤和图像裁剪。基于模型反馈对数据清洗质量进行评估。
数据评估

包括人工评估和基于模型的主动评估,确保数据的高敏捷度和高质量。
指令数据标注

利用语言模型(LM)主动生成和标注指令数据,显著降低行业数据标注成本,进步服从。包括种子指令编写、指令扩增和数据集主动生成与标注。
二、亮数据高服从采集工具先容

亮数据是一家提供全方位网络数据服务的公司,专注于商用署理和数据采集。在数据采集方面,亮数据提供了一系列强大的工具和服务:

  • 署理服务:亮数据提供动态住宅署理、静态住宅署理、机房署理和移动署理,覆盖环球195个国家,拥有凌驾7200万个IP。  亮数据加速数据采集。

  • 数据采集工具:亮数据提供Web Scraper IDE、亮数据浏览器和SERP API等工具,帮助用户主动采集和解锁网站数据。  亮数据加速数据采集。

  • 数据集:提供现成可用的大数据集和基于呆板学习的电商数据分析,满足客户多样化的数据需求。 亮数据

    亮数据通过这些全面的服务,确保用户能够高效、精准地采集和利用网络数据。
访问点击:   亮数据
三、亮数据采集数据可视化实战

亮数据加速数据采集。
3.1 注册后,点击侧边栏 - 数据收集器


3.2 点击Web Scraper IDE 可视化爬虫IDE


亮数据
3.3 可以选择自界说爬取,也可以参照模版


亮数据
3.4 点击运行数据采集器


亮数据
3.5 得到爬取结果,可导出为Json


访问点击:   亮数据加速数据采集。
四、采集的数据后处置惩罚转化为大模型课练习指令实战

按照章节三我们得到了一批Ebay的商品数据,怎样用来生成指令呢?
4.1 大模型练习的指令一般格式
  1. [
  2.     {
  3.         "instruction": "",
  4.         "input": "",
  5.         "output": ""
  6.     }
  7. ]
复制代码
4.2 将亮数据得到的数据转化为练习指令

下面将商品信息转换为微调指令的Python代码示例,同时生成了相应的微调指令(可以根据你需要的内容,设置各种场景):
  1. import json
  2. # 读取商品信息
  3. with open('/mnt/data/lines.json', 'r') as file:
  4.     products = json.load(file)
  5. # 定义函数生成微调指令
  6. def generate_fine_tuning_instructions(product):
  7.     instructions = []
  8.     # 指令1:生成商品简介
  9.     instructions.append({
  10.         "instruction": "Generate a brief description for the product.",
  11.         "input": product['title'],
  12.         "output": f"The {product['title']} is available for {product['price']['value']} {product['price']['currency']}. It is in {product['condition']} condition."
  13.     })
  14.     # 指令2:生成商品标题优化建议
  15.     instructions.append({
  16.         "instruction": "Suggest an optimized title for the product listing.",
  17.         "input": product['title'],
  18.         "output": f"Brand New {product['title']} at Only {product['price']['value']} {product['price']['currency']}!"
  19.     })
  20.     # 指令3:生成商品价格及运费信息
  21.     instructions.append({
  22.         "instruction": "Combine product price and shipping cost into a single string.",
  23.         "input": f"Price: {product['price']['value']} {product['price']['currency']}, Shipping: {product['shipping_price']['value']} {product['shipping_price']['currency']}",
  24.         "output": f"The total cost is {product['price']['value'] + product['shipping_price']['value']} {product['price']['currency']}."
  25.     })
  26.     # 指令4:生成商品链接的简短描述
  27.     instructions.append({
  28.         "instruction": "Create a short description including the product title and the URL.",
  29.         "input": "",
  30.         "output": f"Check out this {product['title']} here: {product['product_url']}"
  31.     })
  32.     # 指令5:生成商品分类描述
  33.     instructions.append({
  34.         "instruction": "Generate a description for the product category.",
  35.         "input": product['category'],
  36.         "output": f"This product belongs to the {product['category']} category, perfect for enhancing your style."
  37.     })
  38.     return instructions
  39. # 生成所有商品的微调指令
  40. all_instructions = []
  41. for product in products:
  42.     all_instructions.extend(generate_fine_tuning_instructions(product))
  43. # 保存生成的微调指令
  44. with open('/mnt/data/fine_tuning_instructions.json', 'w') as outfile:
  45.     json.dump(all_instructions, outfile, indent=4)
  46. # 输出生成的微调指令
  47. for instruction in all_instructions:
  48.     print(json.dumps(instruction, indent=4))
复制代码
该代码从 lines.json 文件中读取商品信息,然后为每个商品生成多个微调指令。这些指令包括生成商品简介、优化商品标题、组合商品代价和运费信息、创建商品链接的简短形貌以及生成商品分类形貌。末了,将这些微调指令生存到一个新的 JSON 文件 fine_tuning_instructions.json 中。
生成如下:
生成的微调指令内容如下:
  1. [
  2.     {
  3.         "instruction": "Generate a brief description for the product.",
  4.         "input": "Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt Navy Medium M",
  5.         "output": "The Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt Navy Medium M is available for 12.5 GBP. It is in Brand new condition."
  6.     },
  7.     {
  8.         "instruction": "Suggest an optimized title for the product listing.",
  9.         "input": "Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt Navy Medium M",
  10.         "output": "Brand New Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt Navy Medium M at Only 12.5 GBP!"
  11.     },
  12.     {
  13.         "instruction": "Combine product price and shipping cost into a single string.",
  14.         "input": "Price: 12.5 GBP, Shipping: 3.99 GBP",
  15.         "output": "The total cost is 16.49 GBP."
  16.     },
  17.     {
  18.         "instruction": "Create a short description including the product title and the URL.(Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt )",
  19.         "input": "",
  20.         "output": "Check out this Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt Navy Medium M here: https://www.ebay.co.uk/itm/266810855159?itmmeta=01HYDB4599C0YG15YV26AMNVTC&hash=item3e1f2a8ef7%3Ag%3AIjoAAOSw3B5mAG0Q&itmprp=enc%3AAQAJAAAA8Py7UNHWp81cjXj6NBwvlndwuF2KS5n8yYBa8wTC0YfKuEhF4mCKkp7hqmBldzj%2FYlsbvOk4avfTViDIAjKX03asNCkz2edAuumM7ZSTrMKRxgyMfpeuRwSqEZ5MgpmfXmYaoUfBSPhDCiha%2FO7VON9bq9EuKZz9F3veWK16TvY8qgWR6sBDsWbMbbOpQbvPcMp4pEwqDOIUN7Wb8ufImjyBDjN8Ec066CmRz9QmgsuaCPSOI1jT8tv4MRjFiPjCK6vrmxhB4ARdOHwLhTrzHKpKHXeOxsO5GiyM%2BDGXAnbBphio%2Fd%2BkkiVvjmjmX6y4PA%3D%3D%7Ctkp%3ABk9SR97UkKvzYw&LH_ItemCondition=1000"
  21.     },
  22.     {
  23.         "instruction": "Generate a description for the product category.(Polo Ralph Lauren Short Sleeve Solid Classic Fit Mesh Polo Shirt Navy Medium M)",
  24.         "input": "Clothes, Shoes & Accessories",
  25.         "output": "This product belongs to the Clothes, Shoes & Accessories category, perfect for enhancing your style."
  26.     },...]
复制代码
4.3 也可以使用大模型来转换指令

比如使用ChatGPT,prompt如下:
  1. 你需要将lines.json文件中的多条商品信息,生成如下格式的多条可供大模型训练的微调指令,这个里面你要根据商品信息,根据自己的知识来找各种角度生成有价值的微调指令,让大模型更加智能。格式如下:[
  2.     {
  3.         "instruction": "",
  4.         "input": "",
  5.         "output": ""
  6.     },
  7. ]
复制代码
五、亮数据,加速大模型数据采集。

亮数据,加速大模型数据采集,为用户提供全面的数据采集服务。Web Scraper IDE、亮数据浏览器和SERP API,帮助用户高效主动化地采集和解锁网站数据。通过这些先辈的技能和服务,亮数据能够显著加速大模型的数据采集过程,为企业和研究机构提供高质量、精准的数据支持。
访问点击:   亮数据

如有帮助,请多关注
TeahLead KrisChang,10+年的互联网和人工智能从业经验,10年+技能和业务团队管理经验,同济软件工程本科,复旦工程管理硕士,阿里云认证云服务资深架构师,上亿营收AI产物业务负责人。

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

魏晓东

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表