Giter VIP home page Giter VIP logo

chatglm-6b-engineering's Introduction

What happens every day:

// Daily situations
if (self.studying.status == true){
    studying.interrupt();
    studying.status = false;
    self.encourage(event.play_computer);
} else {
    self.encourage(event.play_computer);
}

if (parent.angry.status == true){
    self.sad(parent.angry);
    self.studying.status = true;
}

Metrics

chatglm-6b-engineering's People

Contributors

1049451037 avatar adambear avatar binary-husky avatar cherrysaber avatar cjld avatar coderabbit214 avatar dlutkaka avatar duzx16 avatar ganymedenil avatar holk-h avatar hscspring avatar initialencounter avatar is avatar jsl9208 avatar lemonqu-git avatar littlestone0806 avatar luckyzy avatar nczkevin avatar oedosoldier avatar rainatam avatar rong-xiaoli avatar sengxian avatar songxxzp avatar tuteng0915 avatar vinlic avatar xiao9905 avatar yanqiangmiffy avatar yvrjsharma avatar zhangerling avatar zwy4896 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatglm-6b-engineering's Issues

左边栏里对prompt的概括错误

chat_prompt没有被赋值,所以会出现文不达意或者干脆没有概括的问题
我的暂时的修理办法是:

	async def chat(prompt: str):
		chat_prompt = prompt # temp fix

[BUG]5月3日新版的文件运行后 文字生成图片报错 for i in r【'images'】: KeyError: 'images'

Describe the bug
新版的文件运行后 文字生成图片报错 for i in r【'images'】: KeyError: 'images'

To Reproduce
Steps to reproduce the behavior:

  1. 选择 'Stable Diffusion'
  2. 输入提示文字
  3. 点击发送
  4. 报错for i in r【'images'】: KeyError: 'images'

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows
  • Version win11
  • CUDA 11.8

Additional context
Add any other context about the problem here.

-================================

问题确认了,不是BUG 与程序无关

  1. 是本地环境异常 CUDA Toolkit 需要重新安装;
  2. sd-webui-aki-v4 运行异常, 修改Cross-Attention后恢复正常(放弃使用xFormers)

流式应答咨询

您好:

    目前使用如下代码用户聊天可以流式输出
    payload = {
		"prompt": ask_prompt,
		"history": history,
		"prefix": prefix,
		"suffix": suffix
	}
url = f"{get_config()['basic']['host']}:{get_config()['basic']['port']}/stream"
response = requests.post(url, stream=True, json = payload)
resp = ""
for chunk in response.iter_content(chunk_size=1024):
	await asyncio.sleep(0.1)
	resp = chunk.decode('utf-8', 'ignore')
	yield resp
chat_response = resp.replace("data: ", "")
history.append([ask_prompt.strip(), chat_response.strip()])
if len(history) > 10:
	history.pop(0)
log(f"Chat history: {repr(history)}. Response: {repr(chat_response)}", "INFO")
return

    现在我添加了一个知识库问答插件,想在返回流式应答时加上相关文档信息,应该如何修改呢,谢谢

关于SD的一点建议

1、可以把steps做到streamlit的界面上,方便调整。
2、可以把一些用户不想要的需求,做一个对话框,最后生成Nprompt
3、可以考虑后续生成张数的设定

[BUG]经常会出现查询信息为NONE的问题

Loading caption model blip-large...
Loading CLIP model ViT-L-14/openai...
Loaded CLIP model and data in 9.84 seconds.
['知乎专栏', '知乎回复', '百科', '微信公众号', '新闻', 'B站专栏']
我的问题是“分析一下**重庆2018-2022年的GDP情况,并列出18-35岁居民消费金额以及类型,结果用表格输出。”
我在网上查询到了一些参考信息“['None']”
请根据我的问题,参考我给与的信息以及你的理解进行回复

自己搭建,前端无法连接api

api正常,可以ping通
front_end.py正常,显示如下:
[2023-07-23 18:20:54] <init.py:8> <()> EVENT: Loading plugins
[2023-07-23 18:20:54] <init.py:19> <()> EVENT: Plugins loaded
http://127.0.0.1:8003
[2023-07-23 18:20:54] utils.py:107 <validate_config()> INFO: Validating config
[2023-07-23 18:20:54] utils.py:113 <validate_config()> INFO: API host exists, Host: http://127.0.0.1:8003
[2023-07-23 18:20:54] utils.py:115 <validate_config()> INFO: config.json exists
[2023-07-23 18:20:54] utils.py:124 <validate_config()> INFO: API url: http://127.0.0.1:8000
[2023-07-23 18:20:54] utils.py:126 <validate_config()> INFO: Pinging API
[2023-07-23 18:20:54] utils.py:128 <validate_config()> INFO: API use 0.00171 seconds to response, response: "200"
[2023-07-23 18:20:54] utils.py:133 <validate_config()> INFO: Pinging https://cn.bing.com
[2023-07-23 18:20:56] utils.py:135 <validate_config()> INFO: Using 0.65122 seconds to get https://cn.bing.com
[2023-07-23 18:20:56] utils.py:138 <validate_config()> INFO: Validation Passed.
INFO: Started server process [17851]
INFO: Waiting for application startup.
[2023-07-23 18:20:56] <front_end.py:309> <startup_event()> EVENT: FRONT END STARTED
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8003 (Press CTRL+C to quit)

前端页面正常可以打开,但输入对话无反应,是不是前端无法连接api呢

这是api连接不上吗

449d345eadd6ac1a6c6a17d95726f12 您好,我想复现一下您的工程,现在前端vue和后端的api.py文件都已经启动,但是在启动front_end.py文件时却一直是这样,请问这是没有启动成功吗,但是也没有报错也不能前后端进行问答。希望您可以帮助我解决一下这个问题,非常感谢

api.py启动错误?

(my_env) E:\model\chatglm2-6b>python api.py
Traceback (most recent call last):
File "api.py", line 92, in
tokenizer = AutoTokenizer.from_pretrained(r"E:\model\chatglm2-6b", trust_remote_code=True)
File "E:\Environment\my_env\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 659, in from_pretrained
pretrained_model_name_or_path, trust_remote_code=trust_remote_code, **kwargs
File "E:\Environment\my_env\lib\site-packages\transformers\models\auto\configuration_auto.py", line 944, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "E:\Environment\my_env\lib\site-packages\transformers\configuration_utils.py", line 574, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
File "E:\Environment\my_env\lib\site-packages\transformers\configuration_utils.py", line 641, in _get_config_dict
_commit_hash=commit_hash,
File "E:\Environment\my_env\lib\site-packages\transformers\utils\hub.py", line 389, in cached_file
f"{path_or_repo_id} does not appear to have a file named {full_filename}. Checkout "
OSError: E:\model\chatglm2-6b does not appear to have a file named config.json. Checkout 'https://huggingface.co/E:\model\chatglm2-6b/None' for available files.

你的微调是基于prompt的还是模型finetune的?

我试过glm-130b,发现只用prompt很难改变模型对自己能力的理解,比如你问它能处理图片吗,他总是告诉你我是语言模型,无法处理图片请求,但其实我已经在context里告诉了他可以处理图片了。当然我的prompt里的问题不是完全一样,但意思是一样。
比如:
你能处理图片请求吗?
你能分析图片吗?
你能帮我分割图片吗?
你能识别图片里的文字吗?

如果你的问题完全一样,他还是可以正确回答的,但稍微变通一下就回答不了。

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

无法使用网络搜索

平台:Windows10,有浏览器Edge(以及其dev版本)
运行网络搜索后会卡死在搜索阶段,貌似没有返回值

[BUG]SD API return

API error: POST: http://127.0.0.1:7861/sdapi/v1/txt2img {'error': 'TypeError', 'detail': '', 'body': '', 'errors': "'<' not supported between instances of 'int' and 'NoneType'"}
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /home/shadowzz/stable-diffusion-webui/myenv/lib/python3.10/site-packages/anyio/streams/memory.py:94 in receive │
│ │
│ /home/shadowzz/stable-diffusion-webui/myenv/lib/python3.10/site-packages/anyio/streams/memory.py:89 in │
│ receive_nowait │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
WouldBlock

During handling of the above exception, another exception occurred:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /home/shadowzz/stable-diffusion-webui/myenv/lib/python3.10/site-packages/starlette/middleware/base.py:78 in │
│ call_next │
│ │
│ /home/shadowzz/stable-diffusion-webui/myenv/lib/python3.10/site-packages/anyio/streams/memory.py:114 in receive │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
EndOfStream

During handling of the above exception, another exception occurred:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /home/shadowzz/stable-diffusion-webui/modules/api/api.py:145 in exception_handling │
│ │
│ 144 │ │ try: │
│ ❱ 145 │ │ │ return await call_next(request) │
│ 146 │ │ except Exception as e: │
│ │
│ ╭──────────────────────────────────────────── locals ────────────────────────────────────────────╮ │
│ │ call_next = <function BaseHTTPMiddleware.call..call_next at 0x7fd689b6f010> │ │
│ │ e = TypeError("'<' not supported between instances of 'int' and 'NoneType'") │ │
│ │ handle_exception = <function api_middleware..handle_exception at 0x7fd689d375b0> │ │
│ │ request = <starlette.requests.Request object at 0x7fd6891d9600> │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/shadowzz/stable-diffusion-webui/myenv/lib/python3.10/site-packages/starlette/middleware/base.py:84 in │
│ call_next │
│ │
│ ... 20 frames hidden ... │
│ │
│ /home/shadowzz/stable-diffusion-webui/modules/api/api.py:284 in text2imgapi │
│ │
│ 283 │ │ if not self.default_script_arg_txt2img: │
│ ❱ 284 │ │ │ self.default_script_arg_txt2img = self.init_default_script_args(script_runne │
│ 285 │ │ selectable_scripts, selectable_script_idx = self.get_selectable_script(txt2imgre │
│ │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮ │
│ │ script_runner = <modules.scripts.ScriptRunner object at 0x7fd760168190> │ │
│ │ self = <modules.api.api.Api object at 0x7fd605139ab0> │ │
│ │ txt2imgreq = StableDiffusionProcessingTxt2Img( │ │
│ │ │ enable_hr=False, │ │
│ │ │ denoising_strength=0, │ │
│ │ │ firstphase_width=0, │ │
│ │ │ firstphase_height=0, │ │
│ │ │ hr_scale=2.0, │ │
│ │ │ hr_upscaler=None, │ │
│ │ │ hr_second_pass_steps=0, │ │
│ │ │ hr_resize_x=0, │ │
│ │ │ hr_resize_y=0, │ │
│ │ │ prompt='A bird, fly in the sky', │ │
│ │ │ styles=None, │ │
│ │ │ seed=-1, │ │
│ │ │ subseed=-1, │ │
│ │ │ subseed_strength=0, │ │
│ │ │ seed_resize_from_h=-1, │ │
│ │ │ seed_resize_from_w=-1, │ │
│ │ │ sampler_name=None, │ │
│ │ │ batch_size=1, │ │
│ │ │ n_iter=1, │ │
│ │ │ steps=5, │ │
│ │ │ cfg_scale=7.0, │ │
│ │ │ width=512, │ │
│ │ │ height=512, │ │
│ │ │ restore_faces=False, │ │
│ │ │ tiling=False, │ │
│ │ │ do_not_save_samples=False, │ │
│ │ │ do_not_save_grid=False, │ │
│ │ │ negative_prompt='', │ │
│ │ │ eta=None, │ │
│ │ │ s_churn=0.0, │ │
│ │ │ s_tmax=None, │ │
│ │ │ s_tmin=0.0, │ │
│ │ │ s_noise=1.0, │ │
│ │ │ override_settings=None, │ │
│ │ │ override_settings_restore_afterwards=True, │ │
│ │ │ script_args=[], │ │
│ │ │ sampler_index='Euler', │ │
│ │ │ script_name=None, │ │
│ │ │ send_images=True, │ │
│ │ │ save_images=False, │ │
│ │ │ alwayson_scripts={} │ │
│ │ ) │ │
│ ╰─────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/shadowzz/stable-diffusion-webui/modules/api/api.py:241 in init_default_script_args │
│ │
│ 240 │ │ for script in script_runner.scripts: │
│ ❱ 241 │ │ │ if last_arg_index < script.args_to: │
│ 242 │ │ │ │ last_arg_index = script.args_to │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ last_arg_index = 1 │ │
│ │ script = <prompt_matrix.py.Script object at 0x7fd689b64850> │ │
│ │ script_runner = <modules.scripts.ScriptRunner object at 0x7fd760168190> │ │
│ │ self = <modules.api.api.Api object at 0x7fd605139ab0> │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: '<' not supported between instances of 'int' and 'NoneType'
INFO: 127.0.0.1:60200 - "POST /sdapi/v1/txt2img HTTP/1.1" 500 Internal Server Error

无法进行对话

1
2
3
4
如图所示,安装完依赖后,进入页面向它对话,显示一片空白

[BUG]无法正常启动项目?

Describe the bug
我写了一个批处理文件启动项目,看起来没报错,但是浏览器打开 http://localhost:8501/ 显示无此页面。

@echo off
cd /D "%~dp0"
if exist .venv goto :start

echo "Setup VENV"
python -m venv .venv
call .venv\Scripts\activate.bat

echo "Install dependencies"
pip install gradio==3.23.0 -i https://pypi.python.org/simple/
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install --upgrade -r requirements.txt -i https://mirrors.bfsu.edu.cn/pypi/web/simple
goto :run

:start
echo "Start VENV"
call .venv\Scripts\activate.bat
goto :run

:run
echo "Start WebUI"
python api.py
streamlit run streamlit_new.py
pause

Screenshots
image
image

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.