Giter Site home page Giter Site logo

Comments (7)

zacliu2023 avatar zacliu2023 commented on August 26, 2024

建议对prompts进行调整,因为看上去像是一个编程题目,给的样例也不太完整,只有输入,没有输出。

from aquila2.

ningpengtao-coder avatar ningpengtao-coder commented on August 26, 2024

@zacliu2023 重点就是测试模型的推理能力是否有足够的能力理解问题。输出是随机的,有时候python代码,有时候输出json字符串。

from aquila2.

ningpengtao-coder avatar ningpengtao-coder commented on August 26, 2024

@zacliu2023
输出样例1:
以下是从输入中提取到的步骤:

首先,我们将输入分割成三个部分:图像、文本或音频,并将它们存储在一个列表中。

input = "http://xxx.jpg"
list_of_contents = input.split(" ")
keys = ["image", "text", "audio"]
for content in list_of_contents:
if content in keys:
key = content
else:
value = content
接下来,我们使用Python的内置函数和正则表达式来提取值。

import re
value = re.search(r'"([^"]*)"', value).group(1)
最后,我们可以用json.dumps()方法将这些键值对转换为JSON格式的字符串。

data = {key: value}
result = json.dumps(data)
以上就是在给定条件下,完成从输入中提取出的步骤以及最终形成的JSON格式的字符串。

输出样例2:
根据您的要求,我将把输入进行归类和提取,然后将其转换为json格式的字符串。由于您提供的输入包含两个部分,因此我会分开进行处理。首先,您输入的内容会被分类为“image”,“text”或“audio”,并将其用作键来构建json对象。其次,我将对“http://xxx.jpg”进行提取和编码,并将此编码作为值添加到相应的键下,从而构建完整的json对象。最终,我将把完整的json对象转换成一个字符串并返回它。
输出样例3:
{

"image": "http://xxx.jpg",

"text": "这是一张图像",

"audio": ""

}

from aquila2.

ningpengtao-coder avatar ningpengtao-coder commented on August 26, 2024

@zacliu2023 输出结果过于倾向输出python代码了。我并没有告诉模型这是一道编程题,最后面的“仅输出json格式字符串”并没有起效果。

from aquila2.

zacliu2023 avatar zacliu2023 commented on August 26, 2024

我这边主要返回的还是下面的结果,也重复了好几次

这是一个包含3个步骤的生成任务,需要输入:

这是一个包含步骤的生成任务,需要输入:"""xxx""",即原始输入包裹在"""xxx"""中,其中"""xxx"""可以是你实际需要的输入。

下面是处理步骤:

第1步:判断输入是否为"image","text"或"audio"之一,并输出相应键。如果输入不是这三个之一,则返回错误。

第2步:提取输入中的值(即http://xxx.jpg),并将结果存储在键对应的对象中。

第3步:将键和值组成一个json对象,并将该json对象转化为json字符串。

这是一个示例输出:

{
  "image": {
    "args": {
      "value": "http://xxx.jpg"
    }
  }
}

这个输出表示输出是一个json对象,其中包含一个键"image"及其对应的值"http://xxx.jpg",这些值是通过对原始输入进行分类和提取得到的。

from aquila2.

ningpengtao-coder avatar ningpengtao-coder commented on August 26, 2024

@zacliu2023 那可能是量化的问题,我使用的是单卡4090 4bit量化推理的。

from aquila2.

ftgreat avatar ftgreat commented on August 26, 2024

先关闭有问题重新打开issue。

from aquila2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.