Problem link: https://codeforces.com/problemset/problem/1766/D Question: If a number is correct ( x , y ) (x,y) (x,y) is lucky if and only if g c d ( x , y ) = 1 gcd(x,y)=1 gcd(x,y)=1, a chain can be composed of the following regular number pairs, ( x , y ) , ( x + 1 […]
Tag: chai
How to use the chain of responsibility pattern elegantly in business code
The Chain of Responsibility Pattern creates a chain of recipient objects for a request. This pattern gives the type of request and decouples the sender and receiver of the request. This type of design pattern is a behavioral pattern. In this pattern, typically each receiver contains a reference to another receiver. If an object cannot […]
Secure voting system based on blockchain and threshold password (Python+Django+Node+web3+SQLite3)
Table of contents Summary I Abstract I Chapter 1 Introduction 1 1.1 Research background and significance of the topic 1 1.2 Research status at home and abroad 3 1.3 Contents of this article 8 1.4 Structural arrangement 10 Chapter 2 Related Knowledge and Technology 11 2.1 Blockchain related knowledge 11 2.1.1 Blockchain 11 2.1.2 Ethereum […]
Langchain-Chatchat project: 5.1-ChatGLM3-6B tool call
Evaluations on data sets from different perspectives such as semantics, mathematics, reasoning, code, and knowledge show that ChatGLM3-6B-Base has the strongest performance among basic models below 10B. ChatGLM3-6B adopts a newly designed Prompt format, in addition to normal multi-round conversations. At the same time, it natively supports complex scenarios such as tool calling (Function Call), […]
es hybrid retrieval and langchain retrieval enhancement
Langchain Retriever MultiQueryRetriever uses llm to generate three questions with similar meanings for the question, retrieves related documents based on the three questions and returns them all. MultiVectorRetriever, when the same document has multiple records in the vector library because different vectors are stored, deduplication is performed through id. The code implementation is very simple. […]
I use LangChain to build my own LLM application project
With the technological development of LLM, its application in business has become more and more critical. LangChain has greatly lowered the threshold for LLM application development. By introducing what LangChain is, the core components of LangChain, and how LangChain is used in actual scenarios, this article hopes to help everyone quickly get started with the […]
Application of Go language in blockchain development
Introduction Blockchain is a technology field that has attracted much attention in recent years. It not only changes the traditional data exchange and storage methods, but also provides new solutions for various application scenarios. As a simple and efficient programming language, Go language (Golang) is gradually becoming the first choice language for developing blockchain applications. […]
Langchain-Chachat project: Dataset used by 4.2-P-Tuning v2
This article mainly introduces the five tasks in the P-tuning-v2 paper, which are Glue tasks, NER tasks, QA tasks, SRL tasks, and SuperGlue tasks. It focuses on the data sets used for each task. 1.Glue task GLUE (General Language Understanding Evaluation) is a multi-task natural language understanding benchmark and analysis platform created by New York […]
Langchain-Chachat project: 4.1-P-Tuning v2 implementation process
What are the common parameter-efficient fine-tuning methods (Parameter-Efficient Fine-Tuning, PEFT)? Mainly Prompt series and LoRA series. This article mainly introduces the P-Tuning v2 fine-tuning method. As follows: Prompt series, for example, Prefix Tuning(2021.01-Stanford), Prompt Tuning(2021.09-Google), P-Tuning(2021.03-Tsinghua), P-Tuning v2(2022.03-Tsinghua); LoRA series, for example, LoRA(2021.11-Microsoft), AdaLoRA(2023.03-Microsoft), QLoRA(2023.05-Washington). There are also things that I don’t know how to […]
LLM application development based on LangChain 6 – Evaluation
I examine myself three times a day. For applications in the pre-AI era, most languages supported unit testing. Unit testing is a software testing method that verifies that individual units of code in a program work as expected. A unit of code is the smallest testable part of software. In object-oriented programming, this is usually […]