performance maximizing techniques llm

LLM采样后处理总结:LLM的后处理的cpp实现

LLM采样后处理总结:LLM的后处理的cpp实现 在经过LLM的lm_head之后,会得到[batch, vocab_size]大小的矩阵向量,此时需要对输出的逻辑张量进行采样,除了beam_search的贪心策略,还有repetition_penalty、temperature、top_k、top ......
LLM cpp

Graph RAG: 知识图谱结合 LLM 的检索增强

RAG(Retrieval Argumented Generation)这种基于特定任务/问题的文档检索范式中,我们通常先收集必要的上下文,然后利用具有认知能力的机器学习模型进行上下文学习(in-context learning),来合成任务的答案。这次,我们借助 LLM 的力量,强化下 RAG。 ......
图谱 知识 Graph RAG LLM

[Typescript] Type and Interface for performance

Let's say you're creating a component that has all the props of input but needs to add a label prop. You'll need to extend from the ComponentProps typ ......
performance Typescript Interface Type and

【开源项目】AI Vtuber 一个由多LLM驱动的虚拟主播,可以在Bilibili/抖音 直播中与观众实时互动或本地聊天。使用多种TTS技术并可进行AI变声。通过特定指令协同SD绘图。并有循环文案

AI Vtuber是一个由 ChatterBot / GPT / Claude / langchain 本地 or 云端 / chatglm / text-generation-webui / 讯飞星火 / 智谱AI / 谷歌Bard / 文心一言 做为 大脑 驱动的虚拟主播 Live2D / Vt... ......
变声 文案 指令 并有 实时

【二分图】CF1139E Maximize Mex 题解

CF1139E 翻译中有一句话:校长将会从每个社团中各选出一个人。 就是一些人被分为一组,从每组中选一些人出来。 这就很容易想到通过二分图的匹配。 \(\operatorname{mex}\) 运算有一个显而易见的贪心:枚举每个值能否被匹配,第一个找不到的值就是答案。 由于 \(\operatorn ......
题解 Maximize 1139E 1139 Mex

LLM实践-在Colab上使用免费T4 GPU进行Chinese-Llama-2-7b-4bit推理

一、配置环境 1、打开colab,创建一个空白notebook,在[修改运行时环境]中选择15GB显存的T4 GPU. 2、pip安装依赖python包 !pip install --upgrade accelerate !pip install bitsandbytes transformers_ ......
Chinese-Llama Chinese Colab Llama 4bit

论文阅读:iterator zero-shot llm prompting for knowledge graph construction

Abstract 知识图谱,一种相互连接和可解释的结构。 生成需要更多的人力、领域知识、并需要适用于不同的应用领域。 本论文提出借助LLM,通过0-shot和外部知识不可知的情况下生成知识图谱。 主要贡献: 迭代的prompting提取最终图的相关部分 0-shot,不需要examples 一个可扩 ......

解密Prompt系列16. LLM对齐经验之数据越少越好?LTD & LIMA & AlpaGasus

总结下指令微调、对齐样本筛选相关的方案包括LIMA,LTD等。论文都是以优化指令样本为核心,提出对齐阶段的数据质量优于数量,少量+多样+高质量的对齐数据,就能让你快速拥有效果杠杠的模型 ......
AlpaGasus amp 经验 数据 Prompt

大语言模型LLM推理及训练显存计算方法

一、推理:显存计算 推理的显存大头就是:参数量,参数类型版本一般有以下四种: float 32位 浮点数 4 字节 half / BF16 16位 浮点数 2 字节 int8 8位 整数 1 字节 int4 4位 整数 0.5 字节 以 7B-BF16 版本为例,需要显存 = 数量 * 类型大小 = ......
显存 模型 语言 方法 LLM

全新注意力算法PagedAttention:LLM吞吐量提高2-4倍,模型越大效果越好

前言 吞吐量上不去有可能是内存背锅!无需修改模型架构,减少内存浪费就能提高吞吐量! 本文转载自新智元 仅用于学术分享,若侵权请联系删除 欢迎关注公众号CV技术指南,专注于计算机视觉的技术总结、最新技术跟踪、经典论文解读、CV招聘信息。 CV各大方向专栏与各个部署框架最全教程整理 【CV技术指南】CV ......

[NIPS 2021]Do Transformers Really Perform Bad for Graph Representation

[NIPS 2021]Do Transformers Really Perform Bad for Graph Representation 微软提出的graph transformer,名叫Graphormer Transformer 通常,transformer layer有一个self-att ......

lululemon Chargefeel 2 Performance Review

For the record, it goes against every fiber of my selectively nerdy being to forego capitalization of proper nouns. So, dear reader, please know that ......
Performance Chargefeel lululemon Review

基于本地知识库和LLM的知识库问答难点及解决方案

难点:由于langchain采用的是硬切分文档的方式,导致文档分割不够准确,例如:在文档中若有分点描述的情况,对文档硬性分割后,会把各个重点分隔开,导致后续向量召回时,片段是残缺的。如: 如果硬性分割文档,则在召回阶段拿到所有的通知信息。 解决方案:考虑使用语义分析的方式来分割文档,BERT模型训练 ......
知识库 知识 难点 解决方案 方案

Ranking Distillation: Learning Compact Ranking Models With High Performance for Recommender System

目录概符号说明Ranking Distillation代码 Tang J. and Wang K. Ranking Distillation: Learning compact ranking models with high performance for recommender system. ......

Deserializing objects without performing data validation is security-sensitive

Deserializing objects without performing data validation is security-sensitive Bard The rule "Deserializing objects without performing data validation ......

解密Prompt系列15. LLM Agent之数据库应用设计:DIN & C3 & SQL-Palm & BIRD

这一章我们来唠唠大模型和DB数据库之间的交互方案,除了基于Spider数据集的SOTA方案DIN之外,还会介绍两个改良方案C3和SQL-Palm,以及更贴合实际应用的大规模复杂SQL数据集BIRD。 ......
amp SQL-Palm 数据库 数据 Prompt

[LeetCode] 85. Maximal Rectangle_Hard tag: Dynamic Programming

Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: Input: matri ......

Codeforces Round 781 (Div. 2) B. Array Cloning Technique

给一个长度为 \(n\) 的数组 \(a\) 。开始只有一份所给 \(a\) 的副本。你可以做以下两种操作: 选择任意一个副本并且克隆它,然后将会多出一个克隆副本。 交换两个元素,他们属于任意两个副本(可能是同一个)。 需要判断最小操作数,使有一个副本的所有元素相同。 观察一:只需要在开始的副本上让 ......
Codeforces Technique Cloning Array Round

从Google开发者大会浅谈LLM的应用

这周参加了在上海世博中心举办Google I/O Connect中国开发者大会,有几年没参加这么高质量的活动,有点感慨。 期间重点听了关于GCP和Google AI大语言模型的主题演讲,发现目前各大厂商仍然还处于大语言模型的早期应用阶段,Google PaLM 2也不例外。作为业界最领先的AI公司之 ......
开发者 大会 Google LLM

The adjoint technique - 2019

SIGGRAPH 2019: Deep Learning for Content Creation and Real-Time Rendering- The adjoint technique - Video 作者:Jos Stam, NVIDIA SIGGRAPH 2019 In this tal ......
technique adjoint 2019 The

[LeetCode] 1383. Maximum Performance of a Team

You are given two integers n and k and two integer arrays speed and efficiency both of length n. There are n engineers numbered from 1 to n. speed[i]  ......
Performance LeetCode Maximum 1383 Team

Proj CDeepFuzz Paper Reading: PyTorch: an imperative style, high-performance deep learning library

## Abstract 本文: PyTorch Task: detail the implementation and architecture of PyTorch Github: https://github.com/pytorch/pytorch 特点: 1. PyTorch同时关注可用性和速 ......

Common optimize technique

# Vectorization(矢量化) Before we understand the vectorization, we can see a common secnario. We have a array that has 100 float numbers, we want to calc ......
technique optimize Common

通过提示大语言模型进行个性化推荐LLM-Rec: Personalized Recommendation via Prompting Large Language Models

论文原文地址:https://arxiv.org/abs/2307.15780 本文提出了一种提示LLM并使用其生成的内容增强推荐系统的输入的方法,提高了个性化推荐的效果。 ## LLM-Rec Prompting ![](https://img2023.cnblogs.com/blog/17994 ......

基于 LLM 的知识图谱另类实践

大语言模型时代,我们有了 few-shot 和 zero-shot 的能力。借助这些 LLM 能力,如何更便捷地实现知识图谱的知识抽取,用知识图谱来解决相关问题。 ......
图谱 另类 知识 LLM

SemanticFunction 融合 LLM 和传统编程

本文将继续和大家介绍 SemanticKernel 神奇的魔法,将使用 LLM 大语言模型编写的自然语言函数和传统的编程语言编写的函数融合到一起的例子。通过本文的例子,大家可以看到 SemanticKernel 框架所推荐的一个工作模式,同时可以更好的理解 SemanticKernel 框架的用法 ......
SemanticFunction 传统 LLM

1142 Maximal Clique(附测试点1,3错误分析)

题目: A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a cl ......
错误 Maximal Clique 1142

[AIGC] experience on new code LLM(WizardCoder-Python-34B-V1.0) by Wizard

Today I have a try on new large model designed by code generating named WizardCoder-Python-34B-V1.0. It's quite astonishing. You can have a try throug ......

解密Prompt系列14. LLM Agent之搜索应用设计:WebGPT & WebGLM & WebCPM

本章介绍如何和搜索引擎进行交互的LLM Agent设计,主要包含以下几个模块:搜索改写,事实抽取,聚合推理,行为交互。我们会以WebCPM为基础,同时介绍WebGPT,WebGLM的异同 ......
amp Prompt WebGPT WebGLM WebCPM

mlc-llm 环境搭建

mlc-llm 文章总目录:https://www.cnblogs.com/wutou/p/17668924.html ## 环境说明 物理机系统: Windows 11 VMware 虚拟机:16.2.4 build-20089737 VMware 虚拟机系统:[ubuntu-22.04.3-de ......
mlc-llm 环境 mlc llm