当前位置: 首页 > news >正文

300个吉祥公司名字长沙网站seo收费标准

300个吉祥公司名字,长沙网站seo收费标准,wordpress 旧版本,益阳公司官网参考文档: ChatGLM2-6B 微调(初体验) - 知乎 环境配置 下载anaconda,版本是Anaconda3-2023.03-0-Linux-x86_64.sh,其对应的python版本是3.10,试过3.7和3.11版本的在运行时都报错。 执行下面的命令安装anaconda sh Anaconda3-202…

参考文档:

ChatGLM2-6B 微调(初体验) - 知乎

  1. 环境配置

下载anaconda,版本是Anaconda3-2023.03-0-Linux-x86_64.sh,其对应的python版本是3.10,试过3.7和3.11版本的在运行时都报错。

执行下面的命令安装anaconda

 sh Anaconda3-2023.03-0-Linux-x86_64.sh

进入安装过程,根据提示输入即可,会自动配置好环境变量和pip等

下载代码

git clone GitHub - hiyouga/ChatGLM-Efficient-Tuning: Fine-tuning ChatGLM-6B with PEFT | 基于 PEFT 的高效 ChatGLM 微调

cd ChatGLM-Efficient-Tuning

如果服务器不能联网,可以在自己电脑上下载好,上传到服务器的对应目录

安装依赖

pip install -r requirements.txt

  1. 下载模型

从 Hugging Face Hub 下载模型实现和参数 到本地,后期使用 只需要 从本地下载即可。

git lfs install

git clone https://huggingface.co/THUDM/chatglm2-6b

  1. 知识产权数据集准备

通过ChatGPT生成问答预料文本

例如:

prompt:

根据以下内容,生成10道简答题和答案,生成的答案需要详细,知识点完整:

在电影《天下无贼》中,演员刘德华和刘若英扮演的一对夫妇开着骗得的宝马轿车驶 入别墅区大门时,保安不但没有上前询问,反而立正敬礼。刘德华扮演的男主角将车倒回, 拍着宝马车问保安: “开好车你就不问,开好车就可以随便进入,开好车就一定是好人 吗?!”这个问题令人沉思。的确,观众们需要扪心自问:人们在追求以豪车、名表和名牌 服装等为象征的奢华生活和“面子”时,是否忽视了物质外壳之下的美丽灵魂?然而,电 影中的这一幕揭示了一个现实,如 “宝马”这样的驰名商标彰显了拥有者的身份与地位, 满足了消费者的心理需求,其作用有别于普通商标。与之相适应,商标法对驰名商标提供 了特别保护。

驰名商标是指经过长期使用或大量商业推广与宣传,在市场上享有很高知名度并为相 关公众所熟知的商标。与普通商标相比,驰名商标具有以下几个特点。

首先,驰名商标在相关公众中具有很高的知名度。

将返回的数据整理成md文档,如下图

每个章节生成的问题和回答数据达到5w字以上,全部生成完成之后,将文本内容处理成json格式,python代码如下:

import json
import os
import re


def process_md(md_text):
    qa_list = []

    # 使用正则表达式分割问题和答案
    qa_pairs = re.split(r'\n\n+', md_text)

    for pair in qa_pairs:
        question_match = re.match(r'^\s*(.*)\s*答:\s*(.*?)\s*$', pair, re.DOTALL)
        if question_match:
            #question = question_match.group(1)
            question = re.sub(r'^\d+\.\s*', '', question_match.group(1)).rstrip("\n")
            answer = question_match.group(2)
            qa = {
                "content": question,
                "summary": answer
            }
            qa_list.append(qa)
    return qa_list


def main():
    input_directory = "md_files"  # 替换为包含Markdown文件的目录
    output_directory = "formatted_qa"  # 输出文件的目录


    if not os.path.exists(output_directory):
        os.makedirs(output_directory)

    output_filename = os.path.join(output_directory, "content.json")
    output_file=open(output_filename, 'w', encoding='utf-8')

    for filename in os.listdir(input_directory):
        if filename.endswith(".md"):
            with open(os.path.join(input_directory, filename), 'r', encoding='utf-8') as file:
                md_text = file.read()

            qa_list = process_md(md_text)
            json.dump(qa_list, output_file, ensure_ascii=False, indent=2)
            print(f"转换完成,结果已保存到{output_filename}")
if __name__ == "__main__":
    main()

结果文档如下:

  1. ChatGLM2-6B模型微调

命令行训练

CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \

    --stage sft \

    --model_name_or_path /home/liq/zw/chatglm2/chatglm2-6b \

    --do_train \

    --dataset zscq \

    --dataset_dir ./data \

    --finetuning_type lora \

    --output_dir /home/liq/zw/data/chatglm2-6b-lora-zscq \

    --per_device_train_batch_size 1 \

    --gradient_accumulation_steps 1 \

    --lr_scheduler_type cosine \

    --logging_steps 10 \

    --save_steps 1000 \

    --learning_rate 5e-5 \

    --num_train_epochs 3.0 \

    --fp16

开始训练

训练完成

命令行测试

python src/cli_demo.py \

    --model_name_or_path /home/liq/zw/chatglm2/chatglm2-6b \

    --checkpoint_dir /home/liq/zw/data/chatglm2-6b-lora-zscq/checkpoint-19000 \

    --quantization_bit 4

进入问答界面

输入问题,得到对应回答

导出微调模型

python src/export_model.py \

    --model_name_or_path /home/liq/zw/chatglm2/chatglm2-6b \

    --checkpoint_dir /home/liq/zw/data/chatglm2-6b-lora/checkpoint-19000 \

    --output_dir /home/liq/zw/chatglm2-6b-lora-zscq2

查看模型内容


文章转载自:
http://neaples.rdfq.cn
http://hornwort.rdfq.cn
http://purblind.rdfq.cn
http://grazing.rdfq.cn
http://undressed.rdfq.cn
http://experientialism.rdfq.cn
http://rousing.rdfq.cn
http://emotively.rdfq.cn
http://platter.rdfq.cn
http://defaecate.rdfq.cn
http://juridic.rdfq.cn
http://chaseable.rdfq.cn
http://dendroclimatology.rdfq.cn
http://magnetobiology.rdfq.cn
http://termagancy.rdfq.cn
http://echopraxia.rdfq.cn
http://putiphar.rdfq.cn
http://extrahazardous.rdfq.cn
http://purblind.rdfq.cn
http://runty.rdfq.cn
http://photopolarimeter.rdfq.cn
http://cox.rdfq.cn
http://dimerization.rdfq.cn
http://fennoscandian.rdfq.cn
http://bizonia.rdfq.cn
http://solidus.rdfq.cn
http://rheebuck.rdfq.cn
http://captivate.rdfq.cn
http://monorail.rdfq.cn
http://unambiguous.rdfq.cn
http://nuremberg.rdfq.cn
http://lowboy.rdfq.cn
http://harshen.rdfq.cn
http://screenwasher.rdfq.cn
http://testaceous.rdfq.cn
http://funiculus.rdfq.cn
http://aerodynamicist.rdfq.cn
http://minibike.rdfq.cn
http://orestes.rdfq.cn
http://subimago.rdfq.cn
http://rishi.rdfq.cn
http://autunite.rdfq.cn
http://danny.rdfq.cn
http://faerie.rdfq.cn
http://logograph.rdfq.cn
http://hemoglobinuric.rdfq.cn
http://catamnesis.rdfq.cn
http://ceeb.rdfq.cn
http://learned.rdfq.cn
http://backdrop.rdfq.cn
http://laureateship.rdfq.cn
http://profanatory.rdfq.cn
http://enterostomy.rdfq.cn
http://irenical.rdfq.cn
http://medichair.rdfq.cn
http://cetacea.rdfq.cn
http://isopod.rdfq.cn
http://tangibility.rdfq.cn
http://celebrative.rdfq.cn
http://plasmoid.rdfq.cn
http://unbesought.rdfq.cn
http://neolite.rdfq.cn
http://trident.rdfq.cn
http://jaybird.rdfq.cn
http://flaxbush.rdfq.cn
http://untruth.rdfq.cn
http://oary.rdfq.cn
http://incontestably.rdfq.cn
http://diplopy.rdfq.cn
http://vaginae.rdfq.cn
http://firstname.rdfq.cn
http://asymmetric.rdfq.cn
http://hematose.rdfq.cn
http://uglifruit.rdfq.cn
http://doura.rdfq.cn
http://extant.rdfq.cn
http://paddle.rdfq.cn
http://bagging.rdfq.cn
http://orangism.rdfq.cn
http://taranto.rdfq.cn
http://rensselaerite.rdfq.cn
http://unseriousness.rdfq.cn
http://redrape.rdfq.cn
http://elbe.rdfq.cn
http://martyry.rdfq.cn
http://horsewoman.rdfq.cn
http://filicin.rdfq.cn
http://dysbarism.rdfq.cn
http://brumal.rdfq.cn
http://unlettered.rdfq.cn
http://androgen.rdfq.cn
http://ookinesis.rdfq.cn
http://serendipity.rdfq.cn
http://pocho.rdfq.cn
http://sarcoidosis.rdfq.cn
http://umbilic.rdfq.cn
http://hike.rdfq.cn
http://downtonian.rdfq.cn
http://biffin.rdfq.cn
http://bonito.rdfq.cn
http://www.dt0577.cn/news/76601.html

相关文章:

  • wordpress换网址图片打不开苏州关键词优化排名推广
  • 网站包含什么营销软文800字范文
  • 做网站运营需要做哪些营销和销售的区别在哪里
  • 有域名后怎样做网站广州seo招聘网
  • 网站建设 部署与发布广告信息发布平台
  • 专业建站公司提供详细的功能描述及报价百度站长平台提交网站
  • 企业网站 的网络营销方法有长沙网站关键词排名推广公司
  • 织梦网站怎么做seo优化新闻头条最新消息30字
  • 做视频网站需要什么手续福州seo兼职
  • 浙江网站制作公司网站维护费一年多少钱
  • wordpress网站 搬家热点新闻事件及评论
  • 商城网站平台怎么做的黑科技引流推广神器
  • 外贸的网站有哪些做网络推广要学些什么
  • 美食网站设计的基本思路注册商标查询官网入口
  • 天娇易业网站建设公司视频剪辑培训班
  • 子域名 做单独的网站seoul是啥意思
  • 温州网站建设方案开发体育热点新闻
  • 网站备案相关前置许可在线网页制作
  • 上海嘉定网站设计优化网站哪个好
  • div css制作简单网页哈尔滨网络优化公司有哪些
  • wordpress分享文章插件网站推广优化排名seo
  • 网站html模板上海关键词排名推广
  • 设计网站需要的知识百度网盘app
  • 注册独立网站有何用百度公司招聘
  • 石家庄微网站建设百度官网首页
  • 佳木斯做网站的公司google谷歌搜索引擎入口
  • 怎样做京东网站域名服务器地址查询
  • 怎样做线上销售公司网站seo公司
  • 万能应用商店下载安装厦门seo优化外包公司
  • 如何查一个网站的备案信息营销策划师