MCPcopy Index your code

hub / github.com/evelyyyyynnnnn/4.0-Decision-Intelligence-Framework / functions

Functions57 in github.com/evelyyyyynnnnn/4.0-Decision-Intelligence-Framework

↓ 2 callersFunctioncreate_sample_dpo_data
创建示例DPO数据用于测试 Args: output_path: 输出文件路径
llm-fine-tuning-template/data_utils.py:33
↓ 2 callersFunctioncreate_sample_dpo_data
创建示例DPO数据用于测试 Args: output_path: 输出文件路径
llm-fine-tuning-template/DPO Fine-Tuning/data_utils.py:33
↓ 2 callersFunctionformat_dpo_data_for_training
将DPO数据格式化为训练格式 Args: dataset: 原始数据集 tokenizer: 分词器 max_length: 最大长度 Returns: Dataset: 格式化后的
llm-fine-tuning-template/data_utils.py:76
↓ 2 callersFunctionload_dpo_dataset
加载DPO格式的数据集 Args: file_path: 数据文件路径 Returns: Dataset: HuggingFace数据集对象
llm-fine-tuning-template/data_utils.py:9
↓ 2 callersFunctionload_dpo_dataset
加载DPO格式的数据集 Args: file_path: 数据文件路径 Returns: Dataset: HuggingFace数据集对象
llm-fine-tuning-template/DPO Fine-Tuning/data_utils.py:9
↓ 1 callersFunctionapply_peft_to_model
将PEFT配置应用到模型 Args: model: 基础模型 peft_config: PEFT配置 Returns: model: 应用PEFT后的模型
llm-fine-tuning-template/model_utils.py:105
↓ 1 callersFunctionapply_peft_to_model
将PEFT配置应用到模型 Args: model: 基础模型 peft_config: PEFT配置 Returns: model: 应用PEFT后的模型
llm-fine-tuning-template/DPO Fine-Tuning/model_utils.py:105
↓ 1 callersFunctionask_chatgpt
发送请求给 OpenAI 以生成摘要
efficiency-toolkit/key_words_search.py:19
↓ 1 callersFunctioncreate_dpo_trainer
创建DPO训练器
llm-fine-tuning-template/dpo_train.py:75
↓ 1 callersFunctioncreate_dpo_trainer
创建DPO训练器
llm-fine-tuning-template/DPO Fine-Tuning/dpo_train.py:71
↓ 1 callersFunctioncreate_peft_config
创建PEFT配置 Args: lora_r: LoRA rank lora_alpha: LoRA alpha lora_dropout: LoRA dropout target_modules: 目标模块列
llm-fine-tuning-template/model_utils.py:71
↓ 1 callersFunctioncreate_peft_config
创建PEFT配置 Args: lora_r: LoRA rank lora_alpha: LoRA alpha lora_dropout: LoRA dropout target_modules: 目标模块列
llm-fine-tuning-template/DPO Fine-Tuning/model_utils.py:71
↓ 1 callersFunctioncreate_training_arguments
创建训练参数 Args: output_dir: 输出目录 num_train_epochs: 训练轮数 per_device_train_batch_size: 每个设备的训练批次大小 per_device
llm-fine-tuning-template/model_utils.py:131
↓ 1 callersFunctioncreate_training_arguments
创建训练参数 Args: output_dir: 输出目录 num_train_epochs: 训练轮数 per_device_train_batch_size: 每个设备的训练批次大小 per_device
llm-fine-tuning-template/DPO Fine-Tuning/model_utils.py:131
↓ 1 callersFunctionfetch_full_content
访问网页并提取正文内容
efficiency-toolkit/key_words_search.py:41
↓ 1 callersFunctionfetch_full_content
Visit a web page and extract the main content
efficiency-toolkit/Reference_Citation.py:49
↓ 1 callersFunctionfetch_scholar_papers
Fetch scholarly papers related to the query from Google Scholar using SerpAPI
efficiency-toolkit/Reference_Citation.py:84
↓ 1 callersFunctionformat_to_apa
Format a paper's citation in APA style
efficiency-toolkit/Reference_Citation.py:99
↓ 1 callersFunctiongenerate_in_text_citations
Generate in-text citations based on APA format for the references
efficiency-toolkit/Reference_Citation.py:127
↓ 1 callersFunctiongenerate_references_and_citations
(topic)
efficiency-toolkit/Reference_Citation.py:160
↓ 1 callersFunctiongenerate_response
生成回答
llm-fine-tuning-template/test_model.py:48
↓ 1 callersFunctiongenerate_response
生成回答
llm-fine-tuning-template/DPO Fine-Tuning/test_model.py:48
↓ 1 callersFunctionget_combined_research
Get the first 'num_results' Google search results, extract the main content, and combine them into one block of text.
efficiency-toolkit/Reference_Citation.py:66
↓ 1 callersFunctionload_config
加载配置文件
llm-fine-tuning-template/dpo_train.py:42
↓ 1 callersFunctionload_config
加载配置文件
llm-fine-tuning-template/DPO Fine-Tuning/dpo_train.py:38
↓ 1 callersFunctionload_model_and_tokenizer
加载模型和分词器 Args: model_name: 模型名称 use_4bit: 是否使用4bit量化 use_8bit: 是否使用8bit量化 bf16: 是否使用bf16精度 devic
llm-fine-tuning-template/model_utils.py:13
↓ 1 callersFunctionload_model_and_tokenizer
加载模型和分词器 Args: model_name: 模型名称 use_4bit: 是否使用4bit量化 use_8bit: 是否使用8bit量化 bf16: 是否使用bf16精度 devic
llm-fine-tuning-template/DPO Fine-Tuning/model_utils.py:13
↓ 1 callersFunctionload_trained_model
加载训练后的模型
llm-fine-tuning-template/test_model.py:14
↓ 1 callersFunctionload_trained_model
加载训练后的模型
llm-fine-tuning-template/DPO Fine-Tuning/test_model.py:14
↓ 1 callersFunctionmain
主函数
llm-fine-tuning-template/test_setup.py:119
↓ 1 callersFunctionmain
主函数
llm-fine-tuning-template/dpo_train.py:135
↓ 1 callersFunctionmain
主函数
llm-fine-tuning-template/DPO Fine-Tuning/test_setup.py:114
↓ 1 callersFunctionmain
主函数
llm-fine-tuning-template/DPO Fine-Tuning/dpo_train.py:128
↓ 1 callersFunctionmain
()
efficiency-toolkit/key_words_search.py:121
↓ 1 callersFunctionprepare_dataset
准备训练数据集
llm-fine-tuning-template/dpo_train.py:48
↓ 1 callersFunctionprepare_dataset
准备训练数据集
llm-fine-tuning-template/DPO Fine-Tuning/dpo_train.py:44
↓ 1 callersFunctionsave_model_and_tokenizer
保存模型和分词器 Args: model: 训练后的模型 tokenizer: 分词器 output_dir: 输出目录
llm-fine-tuning-template/model_utils.py:206
↓ 1 callersFunctionsave_model_and_tokenizer
保存模型和分词器 Args: model: 训练后的模型 tokenizer: 分词器 output_dir: 输出目录
llm-fine-tuning-template/DPO Fine-Tuning/model_utils.py:203
↓ 1 callersFunctionsave_results
保存搜索结果为 JSON 文件和 TXT 文件
efficiency-toolkit/key_words_search.py:90
↓ 1 callersFunctionsearch_google
通过 Google Custom Search API 获取搜索结果
efficiency-toolkit/key_words_search.py:70
↓ 1 callersFunctionsearch_google
Get search results using Google Custom Search API
efficiency-toolkit/Reference_Citation.py:29
↓ 1 callersFunctionsummarize_content
使用 ChatGPT 生成更详细的摘要(300~500 字)
efficiency-toolkit/key_words_search.py:62
↓ 1 callersFunctiontest_model
测试模型
llm-fine-tuning-template/test_model.py:78
↓ 1 callersFunctiontest_model
测试模型
llm-fine-tuning-template/DPO Fine-Tuning/test_model.py:78
Functionask_chatgpt
(prompt)
efficiency-toolkit/Reference_Citation.py:19
Functionformat_dpo_data_for_training
将DPO数据格式化为训练格式 Args: dataset: 原始数据集 tokenizer: 分词器 max_length: 最大长度 Returns: Dataset: 格式化后的
llm-fine-tuning-template/DPO Fine-Tuning/data_utils.py:76
Functionformat_example
(example)
llm-fine-tuning-template/data_utils.py:88
Functionformat_example
(example)
llm-fine-tuning-template/DPO Fine-Tuning/data_utils.py:88
Functioninsert_in_text_citations
Insert in-text citations into the research paper content
efficiency-toolkit/Reference_Citation.py:146
Functiontest_config
测试配置文件
llm-fine-tuning-template/test_setup.py:92
Functiontest_config
测试配置文件
llm-fine-tuning-template/DPO Fine-Tuning/test_setup.py:87
Functiontest_cuda
测试CUDA可用性
llm-fine-tuning-template/test_setup.py:45
Functiontest_cuda
测试CUDA可用性
llm-fine-tuning-template/DPO Fine-Tuning/test_setup.py:40
Functiontest_data
测试数据文件
llm-fine-tuning-template/test_setup.py:64
Functiontest_data
测试数据文件
llm-fine-tuning-template/DPO Fine-Tuning/test_setup.py:59
Functiontest_imports
测试必要的包是否能正常导入
llm-fine-tuning-template/test_setup.py:14
Functiontest_imports
测试必要的包是否能正常导入
llm-fine-tuning-template/DPO Fine-Tuning/test_setup.py:9