1、大語言模型開發框架的價值是什么?
SDK:Software Development Kit,它是一組軟件工具和資源的集合,旨在幫助開發者創建、測試、部署和維護應用程序或軟件。
所有開發框架(SDK)的核心價值,都是降低開發、維護成本。
大語言模型開發框架的價值,是讓開發者可以更方便地開發基于大語言模型的應用。主要提供兩類幫助:
- 第三方能力抽象。比如 LLM、向量數據庫、搜索接口等
- 常用工具、方案封裝
- 底層實現封裝。比如流式接口、超時重連、異步與并行等
好的開發框架,需要具備以下特點:
- 可靠性、魯棒性高
- 可維護性高
- 可擴展性高
- 學習成本低
舉些通俗的例子:
- 與外部功能解依賴
- 比如可以隨意更換 LLM 而不用大量重構代碼
- 更換三方工具也同理
- 經常變的部分要在外部維護而不是放在代碼里
- 比如 Prompt 模板
- 各種環境下都適用
- 比如線程安全
- 方便調試和測試
- 至少要能感覺到用了比不用方便吧
- 合法的輸入不會引發框架內部的報錯
舉個例子:使用 SDK,4 行代碼實現一個簡易的 RAG 系統
!pip install --upgrade llama-index
from llama_index.core import VectorStoreIndex, SimpleDirectoryReaderdocuments = SimpleDirectoryReader("./data").load_data()
index = VectorStoreIndex.from_documents(documents)query_engine = index.as_query_engine()response = query_engine.query("llama2有多少參數")
print(response)
2、LlamaIndex 介紹
「 LlamaIndex is a framework for building context-augmented LLM applications. Context augmentation refers to any use case that applies LLMs on top of your private or domain-specific data. 」
LlamaIndex 是一個為開發「上下文增強」的大語言模型應用的框架(也就是 SDK)。上下文增強,泛指任何在私有或特定領域數據基礎上應用大語言模型的情況。例如:
-
Question-Answering Chatbots (也就是 RAG)
-
Document Understanding and Extraction (文檔理解與信息抽取)
-
Autonomous Agents that can perform research and take actions (智能體應用)
LlamaIndex 有 Python 和 Typescript 兩個版本,Python 版的文檔相對更完善。
-
Python 文檔地址:https://docs.llamaindex.ai/en/stable/
-
Python API 接口文檔:https://docs.llamaindex.ai/en/stable/api_reference/
-
TS 文檔地址:https://ts.llamaindex.ai/
-
TS API 接口文檔:https://ts.llamaindex.ai/api/
LlamaIndex 是一個開源框架,Github 鏈接:https://github.com/run-llama
LlamaIndex 的核心模塊
安裝 LlamaIndex
- Python
pip install llama-index
- Typescript
# 通過 npm 安裝
npm install llamaindex# 通過 yarn 安裝
yarn add llamaindex# 通過 pnpm 安裝
pnpm add llamaindex
本博客以 Python 版為例進行講解。
3、數據加載(Loading)
SimpleDirectoryReader
是一個簡單的本地文件加載器。它會遍歷指定目錄,并根據文件擴展名自動加載文件(文本內容)。
支持的文件類型:
.csv
- comma-separated values.docx
- Microsoft Word.epub
- EPUB ebook format.hwp
- Hangul Word Processor.ipynb
- Jupyter Notebook.jpeg
,.jpg
- JPEG image.mbox
- MBOX email archive.md
- Markdown.mp3
,.mp4
- audio and video.pdf
- Portable Document Format.png
- Portable Network Graphics.ppt
,.pptm
,.pptx
- Microsoft PowerPoint
import json
from pydantic.v1 import BaseModeldef show_json(data):"""用于展示json數據"""if isinstance(data, str):obj = json.loads(data)print(json.dumps(obj, indent=4))elif isinstance(data, dict) or isinstance(data, list):print(json.dumps(data, indent=4))elif issubclass(type(data), BaseModel):print(json.dumps(data.dict(), indent=4, ensure_ascii=False))def show_list_obj(data):"""用于展示一組對象"""if isinstance(data, list):for item in data:show_json(item)else:raise ValueError("Input is not a list")from llama_index.core import SimpleDirectoryReaderreader = SimpleDirectoryReader(input_dir="./data", # 目標目錄recursive=False, # 是否遞歸遍歷子目錄required_exts=[".pdf"] # (可選)只讀取指定后綴的文件
)
documents = reader.load_data()show_json(documents[0])
print(documents[0].text)
{"id_": "358482ee-4232-45eb-a5ae-8f595f16c8cd","embedding": null,"metadata": {"page_label": "1","file_name": "llama2-extracted.pdf","file_path": "/home/jovyan/lecture-notes/07-llamaindex/data/llama2-extracted.pdf","file_type": "application/pdf","file_size": 401338,"creation_date": "2024-06-14","last_modified_date": "2024-06-14"},"excluded_embed_metadata_keys": ["file_name","file_type","file_size","creation_date","last_modified_date","last_accessed_date"],"excluded_llm_metadata_keys": ["file_name","file_type","file_size","creation_date","last_modified_date","last_accessed_date"],"relationships": {},"text": "Llama 2: OpenFoundation andFine-Tuned ChatModels\nHugo Touvron?Louis Martin?Kevin Stone?\nPeter Albert Amjad Almahairi Yasmine Babaei Nikolay Bashlykov SoumyaBatra\nPrajjwal Bhargava Shruti Bhosale Dan Bikel LukasBlecher Cristian CantonFerrer MoyaChen\nGuillem Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu BrianFuller\nCynthia Gao VedanujGoswami NamanGoyal AnthonyHartshorn Saghar Hosseini RuiHou\nHakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa IsabelKloumann ArtemKorenev\nPunit Singh Koura Marie-AnneLachaux ThibautLavril Jenya Lee Diana Liskovich\nYinghai Lu YuningMao Xavier Martinet Todor Mihaylov PushkarMishra\nIgor Molybog Yixin Nie AndrewPoulton Jeremy Reizenstein Rashi Rungta Kalyan Saladi\nAlan Schelten Ruan Silva EricMichael Smith Ranjan Subramanian XiaoqingEllenTan BinhTang\nRoss Taylor AdinaWilliams JianXiang Kuan PuxinXu ZhengYan Iliyan Zarov YuchenZhang\nAngela Fan MelanieKambadur SharanNarang Aurelien Rodriguez RobertStojnic\nSergey Edunov ThomasScialom?\nGenAI, Meta\nAbstract\nIn this work, we develop and release Llama 2, a collection of pretrained and fine-tuned\nlarge language models (LLMs) ranging in scale from 7 billion to 70 billion parameters.\nOur fine-tuned LLMs, called Llama 2-Chat , are optimized for dialogue use cases. Our\nmodels outperform open-source chat models on most benchmarks we tested, and based on\nourhumanevaluationsforhelpfulnessandsafety,maybeasuitablesubstituteforclosed-\nsource models. We provide a detailed description of our approach to fine-tuning and safety\nimprovements of Llama 2-Chat in order to enable the community to build on our work and\ncontribute to the responsibledevelopmentof LLMs.\n?Equal contribution, corresponding authors: {tscialom, htouvron}@meta.com\n?Second author\nContributions for all the authors can be found in Section A.1.arXiv:2307.09288v2 [cs.CL] 19 Jul 2023","mimetype": "text/plain","start_char_idx": null,"end_char_idx": null,"text_template": "{metadata_str}\n\n{content}","metadata_template": "{key}: {value}","metadata_seperator": "\n","class_name": "Document"
}
Llama 2: OpenFoundation andFine-Tuned ChatModels
Hugo Touvron?Louis Martin?Kevin Stone?
Peter Albert Amjad Almahairi Yasmine Babaei Nikolay Bashlykov SoumyaBatra
Prajjwal Bhargava Shruti Bhosale Dan Bikel LukasBlecher Cristian CantonFerrer MoyaChen
Guillem Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu BrianFuller
Cynthia Gao VedanujGoswami NamanGoyal AnthonyHartshorn Saghar Hosseini RuiHou
Hakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa IsabelKloumann ArtemKorenev
Punit Singh Koura Marie-AnneLachaux ThibautLavril Jenya Lee Diana Liskovich
Yinghai Lu YuningMao Xavier Martinet Todor Mihaylov PushkarMishra
Igor Molybog Yixin Nie AndrewPoulton Jeremy Reizenstein Rashi Rungta Kalyan Saladi
Alan Schelten Ruan Silva EricMichael Smith Ranjan Subramanian XiaoqingEllenTan BinhTang
Ross Taylor AdinaWilliams JianXiang Kuan PuxinXu ZhengYan Iliyan Zarov YuchenZhang
Angela Fan MelanieKambadur SharanNarang Aurelien Rodriguez RobertStojnic
Sergey Edunov ThomasScialom?
GenAI, Meta
Abstract
In this work, we develop and release Llama 2, a collection of pretrained and fine-tuned
large language models (LLMs) ranging in scale from 7 billion to 70 billion parameters.
Our fine-tuned LLMs, called Llama 2-Chat , are optimized for dialogue use cases. Our
models outperform open-source chat models on most benchmarks we tested, and based on
ourhumanevaluationsforhelpfulnessandsafety,maybeasuitablesubstituteforclosed-
source models. We provide a detailed description of our approach to fine-tuning and safety
improvements of Llama 2-Chat in order to enable the community to build on our work and
contribute to the responsibledevelopmentof LLMs.
?Equal contribution, corresponding authors: {tscialom, htouvron}@meta.com
?Second author
Contributions for all the authors can be found in Section A.1.arXiv:2307.09288v2 [cs.CL] 19 Jul 2023
Data Connectors
。
默認的
PDFReader
效果并不理想,我們可以更換文件加載器
# !pip install pymupdf
from llama_index.core import SimpleDirectoryReader
from llama_index.readers.file import PyMuPDFReaderreader = SimpleDirectoryReader(input_dir="./data", # 目標目錄recursive=False, # 是否遞歸遍歷子目錄required_exts=[".pdf"], # (可選)只讀取指定后綴的文件file_extractor={".pdf": PyMuPDFReader()} # 指定特定的文件加載器)documents = reader.load_data()print(documents[0].text)
Llama 2: Open Foundation and Fine-Tuned Chat Models
Hugo Touvron?
Louis Martin?
Kevin Stone?
Peter Albert Amjad Almahairi Yasmine Babaei Nikolay Bashlykov Soumya Batra
Prajjwal Bhargava Shruti Bhosale Dan Bikel Lukas Blecher Cristian Canton Ferrer Moya Chen
Guillem Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu Brian Fuller
Cynthia Gao Vedanuj Goswami Naman Goyal Anthony Hartshorn Saghar Hosseini Rui Hou
Hakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa Isabel Kloumann Artem Korenev
Punit Singh Koura Marie-Anne Lachaux Thibaut Lavril Jenya Lee Diana Liskovich
Yinghai Lu Yuning Mao Xavier Martinet Todor Mihaylov Pushkar Mishra
Igor Molybog Yixin Nie Andrew Poulton Jeremy Reizenstein Rashi Rungta Kalyan Saladi
Alan Schelten Ruan Silva Eric Michael Smith Ranjan Subramanian Xiaoqing Ellen Tan Binh Tang
Ross Taylor Adina Williams Jian Xiang Kuan Puxin Xu Zheng Yan Iliyan Zarov Yuchen Zhang
Angela Fan Melanie Kambadur Sharan Narang Aurelien Rodriguez Robert Stojnic
Sergey Edunov
Thomas Scialom?
GenAI, Meta
Abstract
In this work, we develop and release Llama 2, a collection of pretrained and fine-tuned
large language models (LLMs) ranging in scale from 7 billion to 70 billion parameters.
Our fine-tuned LLMs, called Llama 2-Chat, are optimized for dialogue use cases. Our
models outperform open-source chat models on most benchmarks we tested, and based on
our human evaluations for helpfulness and safety, may be a suitable substitute for closed-
source models. We provide a detailed description of our approach to fine-tuning and safety
improvements of Llama 2-Chat in order to enable the community to build on our work and
contribute to the responsible development of LLMs.
?Equal contribution, corresponding authors: {tscialom, htouvron}@meta.com
?Second author
Contributions for all the authors can be found in Section A.1.
arXiv:2307.09288v2 [cs.CL] 19 Jul 2023
更多的 PDF 加載器還有 SmartPDFLoader
和 LlamaParse
, 二者都提供了更豐富的解析能力,包括解析章節與段落結構等。但不是 100%準確,偶有文字丟失或錯位情況,建議根據自身需求詳細測試評估。
3.2、Data Connectors
用于處理更豐富的數據類型,并將其讀取為 Document
的形式(text + metadata)。
- 內置的文件加載器
- 連接三方服務的數據加載器,例如數據庫
- 更多加載器可以在 LlamaHub 上找到
4、文本切分與解析(Chunking)
為方便檢索,我們通常把 Document
切分為 Node
。
在 LlamaIndex 中,Node
被定義為一個文本的「chunk」。
4.1、使用 TextSplitters 對文本做切分
例如:TokenTextSplitter
按指定 token 數切分文本
from llama_index.core.node_parser import TokenTextSplitterfrom llama_index.core import SimpleDirectoryReaderreader = SimpleDirectoryReader(input_dir="./data", # 目標目錄recursive=False, # 是否遞歸遍歷子目錄required_exts=[".pdf"] # (可選)只讀取指定后綴的文件
)
documents = reader.load_data()
node_parser = TokenTextSplitter(chunk_size=100, # 每個 chunk 的最大長度chunk_overlap=50 # chunk 之間重疊長度
)nodes = node_parser.get_nodes_from_documents(documents, show_progress=False
)for node in nodes:print(node)
D:\develop\anaconda3\envs\llm-project\python.exe D:\projects\llm-project\llama-index\TextSplitters.py
Node ID: be6157bd-acd5-419b-903b-fb335ebf1805
Text: Llama 2: Open Foundation and Fine-Tuned Chat Models Hugo
Touvron? Louis Martin? Kevin Stone? Peter Albert Amjad Almahairi
Yasmine Babaei Nikolay Bashlykov Soumya Batra Prajjwal Bhargava Shruti
Bhosale Dan Bikel Lukas Blecher
Node ID: b76c809f-16b6-4988-94e2-7feafcfdd506
Text: Louis Martin? Kevin Stone? Peter Albert Amjad Almahairi Yasmine
Babaei Nikolay Bashlykov Soumya Batra Prajjwal Bhargava Shruti Bhosale
Dan Bikel Lukas Blecher Cristian Canton Ferrer Moya Chen Guillem
Cucurull David
Node ID: 578cb67c-1bff-4dd8-9329-af4c2f8f881b
Text: Babaei Nikolay Bashlykov Soumya Batra Prajjwal Bhargava Shruti
Bhosale Dan Bikel Lukas Blecher Cristian Canton Ferrer Moya Chen
Guillem Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu Brian
Fuller Cynthia Gao
Node ID: dbb31d51-67ad-4d21-93d5-5062275a66c1
Text: Shruti Bhosale Dan Bikel Lukas Blecher Cristian Canton Ferrer
Moya Chen Guillem Cucurull David Esiobu Jude Fernandes Jeremy Fu
Wenyin Fu Brian Fuller Cynthia Gao Vedanuj Goswami Naman Goyal Anthony
Hartshorn Saghar Hosseini Rui
Node ID: 2d6466e9-a4d4-454e-a2d3-631364d0a126
Text: Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu Brian
Fuller Cynthia Gao Vedanuj Goswami Naman Goyal Anthony Hartshorn
Saghar Hosseini Rui Hou Hakan Inan Marcin Kardas Viktor Kerkez Madian
Khabsa Isabel Kloumann
Node ID: 3dcaf924-e52e-4d93-98bc-9292a1884a40
Text: Gao Vedanuj Goswami Naman Goyal Anthony Hartshorn Saghar
Hosseini Rui Hou Hakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa
Isabel Kloumann Artem Korenev Punit Singh Koura Marie-Anne Lachaux
Thibaut Lavril Jenya
Node ID: 8fa64cb9-c510-4223-b0cb-e223178ebdb9
Text: Rui Hou Hakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa
Isabel Kloumann Artem Korenev Punit Singh Koura Marie-Anne Lachaux
Thibaut Lavril Jenya Lee Diana Liskovich Yinghai Lu Yuning Mao Xavier
Martinet Todor
Node ID: 9f5c2d90-ffe9-4efe-a5b1-68eef0119b5d
Text: Madian Khabsa Isabel Kloumann Artem Korenev Punit Singh Koura
Marie-Anne Lachaux Thibaut Lavril Jenya Lee Diana Liskovich Yinghai Lu
Yuning Mao Xavier Martinet Todor Mihaylov Pushkar Mishra Igor Molybog
Yixin Nie Andrew
Node ID: fff15a52-a0da-40c8-a09a-0fe1ea2d6ea1
Text: Marie-Anne Lachaux Thibaut Lavril Jenya Lee Diana Liskovich
Yinghai Lu Yuning Mao Xavier Martinet Todor Mihaylov Pushkar Mishra
Igor Molybog Yixin Nie Andrew Poulton Jeremy Reizenstein Rashi Rungta
Kalyan Saladi Alan
Node ID: 5fa0508f-3ca7-4425-a48c-a9cde1112060
Text: Lu Yuning Mao Xavier Martinet Todor Mihaylov Pushkar Mishra Igor
Molybog Yixin Nie Andrew Poulton Jeremy Reizenstein Rashi Rungta
Kalyan Saladi Alan Schelten Ruan Silva Eric Michael Smith Ranjan
Subramanian Xiaoqing Ellen Tan Binh Tang Ross
Node ID: ee895744-82ae-49ad-94c0-8368c0790dea
Text: Molybog Yixin Nie Andrew Poulton Jeremy Reizenstein Rashi Rungta
Kalyan Saladi Alan Schelten Ruan Silva Eric Michael Smith Ranjan
Subramanian Xiaoqing Ellen Tan Binh Tang Ross Taylor Adina Williams
Jian Xiang Kuan Puxin Xu Zheng Yan Iliyan Zarov
Node ID: 0138d1ac-6358-47c3-8f52-d0054b80a568
Text: Kalyan Saladi Alan Schelten Ruan Silva Eric Michael Smith Ranjan
Subramanian Xiaoqing Ellen Tan Binh Tang Ross Taylor Adina Williams
Jian Xiang Kuan Puxin Xu Zheng Yan Iliyan Zarov Yuchen Zhang Angela
Fan Melanie Kambadur Sharan Narang Aurelien Rodriguez Robert
Node ID: 73429f67-589e-442d-89af-1513be6bb88f
Text: Xiaoqing Ellen Tan Binh Tang Ross Taylor Adina Williams Jian
Xiang Kuan Puxin Xu Zheng Yan Iliyan Zarov Yuchen Zhang Angela Fan
Melanie Kambadur Sharan Narang Aurelien Rodriguez Robert Stojnic
Sergey Edunov Thomas Scialom? GenAI,
Node ID: 9d37dbc7-16ef-4036-bb8f-5f3091dba100
Text: Xu Zheng Yan Iliyan Zarov Yuchen Zhang Angela Fan Melanie
Kambadur Sharan Narang Aurelien Rodriguez Robert Stojnic Sergey Edunov
Thomas Scialom? GenAI, Meta Abstract In this work, we develop and
release Llama 2, a collection of pretrained and
Node ID: 87459f44-90eb-43c8-9e4c-329777efe449
Text: Sharan Narang Aurelien Rodriguez Robert Stojnic Sergey Edunov
Thomas Scialom? GenAI, Meta Abstract In this work, we develop and
release Llama 2, a collection of pretrained and fine-tuned large
language models (LLMs) ranging in scale from 7 billion to
Node ID: 8f8a5262-03a3-4e0d-9c5f-f6830bd2cf27
Text: Scialom? GenAI, Meta Abstract In this work, we develop and
release Llama 2, a collection of pretrained and fine-tuned large
language models (LLMs) ranging in scale from 7 billion to 70 billion
parameters. Our fine-tuned LLMs, calledLlama
Node ID: fc5b70c8-4e78-40bf-9d77-911391e5ea1c
Text: we develop and release Llama 2, a collection of pretrained and
fine-tuned large language models (LLMs) ranging in scale from 7
billion to 70 billion parameters. Our fine-tuned LLMs, calledLlama
2-Chat, are optimized for dialogue use cases. Our models outperform
open-source chat models
Node ID: 6d36968c-de01-4afa-97dc-7987a192bf30
Text: models (LLMs) ranging in scale from 7 billion to 70 billion
parameters. Our fine-tuned LLMs, calledLlama 2-Chat, are optimized for
dialogue use cases. Our models outperform open-source chat models on
most benchmarks we tested, and based on our human evaluations for
helpfulness and safety, may
Node ID: e7ef4823-6937-4d80-824e-693bd81dc149
Text: LLMs, calledLlama 2-Chat, are optimized for dialogue use cases.
Our models outperform open-source chat models on most benchmarks we
tested, and based on our human evaluations for helpfulness and safety,
may be a suitable substitute for closed- source models. We provide a
detailed description of our approach to fine-tuning
Node ID: d1c044a6-02e6-4d88-a92f-a96b65da6de0
Text: outperform open-source chat models on most benchmarks we tested,
and based on our human evaluations for helpfulness and safety, may be
a suitable substitute for closed- source models. We provide a detailed
description of our approach to fine-tuning and safety improvements
ofLlama 2-Chatin order to enable the community to build on our
Node ID: de25c573-8d6f-4d81-8cc0-2df0b8706f6d
Text: helpfulness and safety, may be a suitable substitute for closed-
source models. We provide a detailed description of our approach to
fine-tuning and safety improvements ofLlama 2-Chatin order to enable
the community to build on our work and contribute to the responsible
development of LLMs. ?Equal contribution, corresponding
Node ID: 366723b1-8227-4c8e-9cdf-fb6596c6b607
Text: description of our approach to fine-tuning and safety
improvements ofLlama 2-Chatin order to enable the community to build
on our work and contribute to the responsible development of LLMs.
?Equal contribution, corresponding authors: {tscialom,
htouvron}@meta.com ?Second
Node ID: b1d0a429-f88c-4eaf-a5e2-438395063dd1
Text: 2-Chatin order to enable the community to build on our work and
contribute to the responsible development of LLMs. ?Equal
contribution, corresponding authors: {tscialom, htouvron}@meta.com
?Second author Contributions for all the authors can be found in
Section
Node ID: 3bd1cf71-efdd-476c-ae63-f6813cd426ff
Text: work and contribute to the responsible development of LLMs.
?Equal contribution, corresponding authors: {tscialom,
htouvron}@meta.com ?Second author Contributions for all the authors
can be found in Section A.1. arXiv:2307.09288v2 [cs.CL]
Node ID: a419b2de-57a0-4d13-8316-89ca3c388038
Text: authors: {tscialom, htouvron}@meta.com ?Second author
Contributions for all the authors can be found in Section A.1.
arXiv:2307.09288v2 [cs.CL] 19 Jul 2023
Node ID: c14bc803-2b66-4791-acf1-40c3c3824248
Text: Contents 1 Introduction 3 2 Pretraining 5 2.1 Pretraining Data .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 5 2.2
Node ID: cd88caab-f720-44d0-b60f-52d3f5a8c47a
Text: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . 5 2.2 Training Details . . . . . . . . . . . .
. . . . . .
Node ID: 060e2c44-e137-48fc-997a-fef9e1253af1
Text: . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Training
Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . .
Node ID: 84a3b614-fa9a-4a10-933f-4ea49eb42da5
Text: . . . . 5 2.2 Training Details . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Llama
2Pretrained Model
Node ID: d147d85b-a6f9-4c26-b7d7-61e897c67c67
Text: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 5 2.3 Llama 2Pretrained Model Evaluation . . . . . . . . . .
. . . . . . . . .
Node ID: 74ecb943-d7b1-479e-b280-8a94be4c97f5
Text: . . . . . . . . . . . . . . . . . 5 2.3 Llama 2Pretrained Model
Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 7 3 Fine-tuning
Node ID: d6860cfa-8486-41c4-80bd-4bc53788b13a
Text: Llama 2Pretrained Model Evaluation . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 7 3 Fine-tuning 8 3.1 Supervised
Fine-Tuning (SFT) . . . . . . . .
Node ID: 3bd146c0-a554-4e4d-94a9-24cba2a3dbc2
Text: . . . . . . . . . . . . . . . . . . . . 7 3 Fine-tuning 8 3.1
Supervised Fine-Tuning (SFT) . . . . . . . . . . . . . . . . . . . . .
. . . . . . .
Node ID: b84e1605-0ac9-4c9f-9ff5-