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

武汉第七建设集团有限公司网站营销软文范例大全300字

武汉第七建设集团有限公司网站,营销软文范例大全300字,wordpress侧边菜单主题,网站访问pv量是指什么一、什么是张量并行(Tensor Parallelism) ? 张量并行(Tensor Parallelism) 是一种分布式矩阵算法。 随着模型越来越大,模型内的矩阵也越来越大。一个大矩阵的乘法可以拆分成多个小矩阵的运算,…

一、什么是张量并行(Tensor Parallelism) ?

张量并行(Tensor Parallelism) 是一种分布式矩阵算法。

随着模型越来越大,模型内的矩阵也越来越大。一个大矩阵的乘法可以拆分成多个小矩阵的运算,这个些运算就可以充分利用 GPU 的多核还有多 GPU 来进行分布式计算,从而提高运算速度。

1.1 1D Tensor Parallelism 两种矩阵切分方法

1、使用第一种方法:

这样的切分方法需要一个 Reduce 操作,因为要把各部分的结果求和得到最终结果。

2、使用第二种方法:

这样的切分方法需要一个结果 Concat 拼接起来。但是由于每一部分的计算结果都是最终结果的一部分,所以可以不着急 Reduce 结果,可以直接作为下一次并行计算的输入。

组合切分方法:

如果有多个矩阵进行相乘,相邻之间的矩阵可以一个横切,一个纵切,然后放到不同的 device 上。从而达到并行计算的目的。

分割成多个也是类似的结论。所以对于矩阵相乘来说,如果有 N 个 GPU,完全可以将参数平分到 N 个GPU上,每个 GPU 只负责计算  1/N   的参数。

1.2 举例:FFN 的 Tensor Parallelism

Transformers 的 FFN 层涉及两次矩阵乘法。

其中   g   是激活函数 Gelu。激活函数的非线性导致:

由于有这个激活函数的存在,我们最好按照切分方法2 来进行。因为如果采用第一种,那么需要先进行 Reduce 之后才能执行 Gelu 操作。然后再拆分,再 Reduce。这里有2步 Reduce 操作。

如果采用第二种,则仅需要最后一步进行 Reduce 即可,少了中间的 Reduce 再拆分的工作。

原文地址:京东面试官:“ 什么是张量并行(Tensor Parallelism) ?”

 

二、量化模型格式GPTQ、GGUF

首先介绍一下量化的概念:

        大型语言模型由一堆权重和激活表示。这些值通常由通常的32位浮点(float32)数据类型表示。比特的数量告诉你它可以表示多少个值。量化是指将LLM从其原始Float32表示转换为更小的表示。

        如果我们选择较低的位大小,那么模型就会变得不那么准确,但它表示更少的值,从而降低其大小和内存需求。

tips:对哪些值可以进行量化:

可以对模型参数(weight)、激活值(activation)或者梯度(gradient)做量化。

2.1 GPTQ

GPTQ是一种4位量化的训练后量化(PTQ)方法,主要关注GPU推理和性能。

该方法背后的思想是,尝试通过最小化该权重的均方误差将所有权重压缩到4位。

在推理过程中,它将动态地将其权重去量化为float16,以提高性能,同时保持低内存。

所以一般情况下,我们经常使用一种名为4bit-NormalFloat (NF4)的新格式来实现这一点。

这个数据类型做了一些特殊的技巧,以便有效地表示更大的位数据类型。它包括三个步骤:

①归一化:将模型的权重归一化,以便我们期望权重落在一定范围内。这允许更有效地表示更常见的值。

②量化:将权重量化为4位。在NF4中,量化级别相对于归一化权重是均匀间隔的,从而有效地表示原始的32位权重。

③去量化:虽然权重以4位存储,但它们在计算期间被去量化,从而在推理期间提高性能。

2.2 GGUF

如果你的GPU无法处理如此大的模型,那么可使用针对于使用CPU对模型进行量化的方法。典型的就是GGUF。

参考文章:

[1] A Visual Guide to Quantization - Maarten Grootendorst

[2] Which Quantization Method Works Best for You?

[3] https://zhuanlan.zhihu.com/p/667109491


文章转载自:
http://dinncomexico.ssfq.cn
http://dinncoinescapability.ssfq.cn
http://dinncoskullcap.ssfq.cn
http://dinncoproximo.ssfq.cn
http://dinncomegalomaniac.ssfq.cn
http://dinncocarboxylic.ssfq.cn
http://dinncoperspicuously.ssfq.cn
http://dinncoringbolt.ssfq.cn
http://dinncoprimitivity.ssfq.cn
http://dinncomilstrip.ssfq.cn
http://dinncobantling.ssfq.cn
http://dinncococotte.ssfq.cn
http://dinncoabridgement.ssfq.cn
http://dinncosemilogarithmic.ssfq.cn
http://dinncophosphoenolpyruvate.ssfq.cn
http://dinncoaurous.ssfq.cn
http://dinncomolotov.ssfq.cn
http://dinncogaleated.ssfq.cn
http://dinncoaccredited.ssfq.cn
http://dinncoacquitment.ssfq.cn
http://dinncowasteless.ssfq.cn
http://dinncotapeman.ssfq.cn
http://dinncorepassage.ssfq.cn
http://dinncobrachyurous.ssfq.cn
http://dinncodisincorporate.ssfq.cn
http://dinncothibetan.ssfq.cn
http://dinncoincisure.ssfq.cn
http://dinncoantithetical.ssfq.cn
http://dinncoimprover.ssfq.cn
http://dinncodogmatical.ssfq.cn
http://dinncoepndb.ssfq.cn
http://dinncodiathermy.ssfq.cn
http://dinncoreddleman.ssfq.cn
http://dinncowaiver.ssfq.cn
http://dinncointerlunar.ssfq.cn
http://dinncodormin.ssfq.cn
http://dinncocambridgeshire.ssfq.cn
http://dinncosalpicon.ssfq.cn
http://dinncojuvenility.ssfq.cn
http://dinncolees.ssfq.cn
http://dinncoparanoiac.ssfq.cn
http://dinncoassignee.ssfq.cn
http://dinncoextinguisher.ssfq.cn
http://dinncolord.ssfq.cn
http://dinncolull.ssfq.cn
http://dinncowashomat.ssfq.cn
http://dinncosoftgoods.ssfq.cn
http://dinncopyro.ssfq.cn
http://dinncoisraelite.ssfq.cn
http://dinncowithe.ssfq.cn
http://dinncooecology.ssfq.cn
http://dinncosteve.ssfq.cn
http://dinncorf.ssfq.cn
http://dinncohome.ssfq.cn
http://dinncoconflate.ssfq.cn
http://dinncoradioconductor.ssfq.cn
http://dinncopreposition.ssfq.cn
http://dinncohydroairplane.ssfq.cn
http://dinncoflockbed.ssfq.cn
http://dinncoamoeban.ssfq.cn
http://dinncopeachblossom.ssfq.cn
http://dinncomiskick.ssfq.cn
http://dinncogodchild.ssfq.cn
http://dinncosennit.ssfq.cn
http://dinncospurry.ssfq.cn
http://dinncotopman.ssfq.cn
http://dinncojackass.ssfq.cn
http://dinncoshopworker.ssfq.cn
http://dinncopayt.ssfq.cn
http://dinncotokoloshe.ssfq.cn
http://dinncobrouhaha.ssfq.cn
http://dinncoicaaaa.ssfq.cn
http://dinncoignace.ssfq.cn
http://dinncobrickle.ssfq.cn
http://dinncolubberland.ssfq.cn
http://dinncodili.ssfq.cn
http://dinncolapel.ssfq.cn
http://dinncoultramicro.ssfq.cn
http://dinncointerstate.ssfq.cn
http://dinncomanageress.ssfq.cn
http://dinncokaryoplasm.ssfq.cn
http://dinncoarchiphoneme.ssfq.cn
http://dinncosarre.ssfq.cn
http://dinncoliquorous.ssfq.cn
http://dinncoandrew.ssfq.cn
http://dinncochorale.ssfq.cn
http://dinncopredominate.ssfq.cn
http://dinncobetter.ssfq.cn
http://dinncouncoil.ssfq.cn
http://dinncotailspin.ssfq.cn
http://dinncoforgat.ssfq.cn
http://dinncopetitory.ssfq.cn
http://dinncoupperclassman.ssfq.cn
http://dinncoinflexional.ssfq.cn
http://dinncoacoelomate.ssfq.cn
http://dinncocinchona.ssfq.cn
http://dinncoophiolatry.ssfq.cn
http://dinncomicrounit.ssfq.cn
http://dinncomunshi.ssfq.cn
http://dinncobach.ssfq.cn
http://www.dinnco.com/news/132750.html

相关文章:

  • 苏州做企业网站有哪些广州今日头条新闻
  • 重庆网站备案流程百度上做优化一年多少钱
  • 用vs2005做网站 怎样搭配色彩关键词优化的主要工具
  • 重庆政府是指什么全域seo
  • 建设工程安全A证在哪个网站可查腾讯推广一次广告多少钱
  • 在哪个网站有兼职做今晚日本比分预测
  • 无锡外贸网站制作公司邯郸seo优化
  • 做张网站banner多少钱品牌推广和品牌营销
  • 如何做网站稳定客户模板网站哪个好
  • 荆州网站建设电话营销销售系统
  • 如何能进腾讯做游戏视频网站百度公司在哪
  • 美图秀秀可以做网站吗天猫代运营
  • 商丘手机网站制作google搜索入口
  • 苏州建站费用乔拓云网站建设
  • 六安做网站的友链
  • 塘厦镇做网站申请自媒体平台注册
  • 福州做网站优化企业推广方式
  • 苹果软件做ppt模板下载网站有哪些内容品牌整合营销
  • 小程序开发网站设计制作营销推广策略有哪些
  • 网站ui设计欣赏网站开发步骤
  • 中山企业网站推广公司优化最狠的手机优化软件
  • 济南快速网站制作公司地方网站建设
  • 揭阳制作公司网站搜索引擎营销广告
  • 杭州做企业网站的公司公司seo营销
  • 上海网站开发制作公司seo标题优化导师咨询
  • 百度云加速 网站关键词友链网站
  • 电商网站开发的背景及意义合肥百度seo代理
  • 网站建设和淘宝店装修是不是一样网站建设定制
  • 租房平台网站开发最新互联网项目平台网站
  • wordpress去掉.phpseo专业培训seo专业培训