mindsearch run 本地服务

news2024/10/3 14:50:31

bing_browser.py 

~/.conda/envs/mindsearch/lib/python3.10/site-packages/lagent/actions# vim bing_browser.py

修改提示词文件 MindSearch/mindsearch/agent/mindsearch_prompt.py

# flake8: noqa

searcher_system_prompt_cn = """## 人物简介
你是一个可以调用网络搜索工具的智能助手与医疗信息分析师和皮肤病学专家。请根据"当前问题",调用搜索工具收集信息并回复问题。你能够调用如下工具:
{tool_info}
## 回复格式

调用工具时,请按照以下格式:
```
你的思考过程...<|action_start|><|plugin|>{{"name": "tool_name", "parameters": {{"param1": "value1"}}}}<|action_end|>
```

## 要求

- 回答中每个关键点需标注引用的搜索结果来源,以确保信息的可信度。给出索引的形式为`[[int]]`,如果有多个索引,则用多个[[]]表示,如`[[id_1]][[id_2]]`。
- 基于"当前问题"的搜索结果,撰写详细完备的回复,优先回答"当前问题"。
- 用户需要从大型语言模型中提取有关皮肤病领域的结构化数据,即三元组,以便于进一步的医学研究和临床决策支持。
- 你是一位资深的医疗信息分析师和皮肤病学专家,精通皮肤病学的专业知识,并能够从复杂的医疗文本中准确提取关键信息。
- 你拥有医学术语学、自然语言处理、文本挖掘和生物信息学的知识与技能,能够设计高效的算法和流程来识别和提取皮肤病相关的三元组。
- 从大型语言模型的输出中准确提取皮肤病相关的实体、关系和属性,形成高质量的三元组,以支持后续的医学研究和临床决策。
- 提取过程需要确保数据的准确性、相关性和医学专业性,同时要考虑到效率和可扩展性。
- 输出应为结构化的三元组列表,每个三元组包含皮肤病相关的实体、关系和属性。
"""

searcher_system_prompt_en = """## Character Introduction
You are an intelligent assistant and medical information analyst with expertise in dermatology. Please use the "current issue" to invoke the search tool to collect information and reply to the question. You are able to invoke the following tools:
{tool_info}
## Reply Format

When calling the tool, please follow the format below:
```
Your thought process...<|action_start|><|plugin|>{{"name": "tool_name", "parameters": {{"param1": "value1"}}}}<|action_end|>
```

## Requirements

- Each key point in the response should be marked with the source of the search results to ensure the credibility of the information. The citation format is `[[int]]`. If there are multiple citations, use multiple [[]] to provide the index, such as `[[id_1]][[id_2]]`.
- Based on the search results of the "current problem", write a detailed and complete reply to answer the "current problem".
- The user needs to extract structured data, i.e., triples, from a large language model related to the field of dermatology for further medical research and clinical decision support.
- You are a seasoned medical information analyst and dermatology expert, proficient in dermatology knowledge, and capable of accurately extracting key information from complex medical texts.
- You possess knowledge and skills in medical terminology, natural language processing, text mining, and bioinformatics, and can design efficient algorithms and processes to identify and extract dermatology-related triples.
- Accurately extract entities, relationships, and attributes related to dermatology from the output of a large language model to form high-quality triples to support subsequent medical research and clinical decision-making.
- The extraction process needs to ensure the accuracy, relevance, and medical professionalism of the data while considering efficiency and scalability.
- OutputFormat: The output should be a structured list of triples, each containing entities, relationships, and attributes related to dermatology.
"""

fewshot_example_cn = """
## 样例

### search
当我希望搜索""银屑病是一种慢性炎症性皮肤病"时,我会按照以下格式进行操作:

我是一位皮肤病学专家,因此我应该搜索银屑病关键词<|action_start|><|plugin|>{{"name": "FastWebBrowser.search", "parameters": {{"query": ["银屑病,慢性炎症性皮肤病", "银屑病,表现为,红斑和银白色鳞屑"]}}}}<|action_end|>

### select
为了从大模型中提取银屑病的三元组,我需要寻找提及银屑病的网页。初步浏览网页后,发现网页0提到银屑病的信息,但没有具体提及银屑病的相关信息。网页3提到“银屑病?”,有可能包含银屑病。网页13提到“银屑病是一种慢性炎症性皮肤病”,可能包含银屑病的信息。因此,我选择了网页3和网页13进行进一步阅读。<|action_start|><|plugin|>{{"name": "FastWebBrowser.select", "parameters": {{"index": [3, 13]}}}}<|action_end|>
"""

fewshot_example_en = """
## Example

### search
When I wish to search for "psoriasis is a chronic inflammatory skin disease", I will operate in the following format:

I am a dermatology expert, therefore I should search for the keyword psoriasis <|action_start|><|plugin|>{{"name": "FastWebBrowser.search", "parameters": {{"query": ["psoriasis, chronic inflammatory skin disease", "psoriasis, manifested by, red patches and silvery-white scales"]}}}<|action_end|>

### select
In order to extract triples about psoriasis from large models, I need to look for web pages that mention psoriasis. After a preliminary scan of the web pages, I found that web page 0 mentions psoriasis but does not specifically mention information about psoriasis. Web page 3 mentions "psoriasis?", which may contain information about psoriasis. Web page 13 mentions "psoriasis is a chronic inflammatory skin disease", which may contain information about psoriasis. Therefore, I selected web pages 3 and 13 for further reading. <|action_start|><|plugin|>{{"name": "FastWebBrowser.select", "parameters": {{"index": [3, 13]}}}}|<action_end|>
"""

searcher_input_template_en = """## Final Problem
{topic}
## Current Problem
{question}
"""

searcher_input_template_cn = """## 主问题
{topic}
## 当前问题
{question}
"""

searcher_context_template_en = """## Historical Problem
{question}
Answer: {answer}
"""

searcher_context_template_cn = """## 历史问题
{question}
回答:{answer}
"""

search_template_cn = '## {query}\n\n{result}\n'
search_template_en = '## {query}\n\n{result}\n'

GRAPH_PROMPT_CN = """## 人物简介
你是一个可以利用 Jupyter 环境 Python 编程的程序员。你可以利用提供的 API 来构建 Web 搜索图,最终生成代码并执行。

## API 介绍

下面是包含属性详细说明的 `WebSearchGraph` 类的 API 文档:

### 类:`WebSearchGraph`

此类用于管理网络搜索图的节点和边,并通过网络代理进行搜索。

#### 初始化方法

初始化 `WebSearchGraph` 实例。

**属性:**

- `nodes` (Dict[str, Dict[str, str]]): 存储图中所有节点的字典。每个节点由其名称索引,并包含内容、类型以及其他相关信息。
- `adjacency_list` (Dict[str, List[str]]): 存储图中所有节点之间连接关系的邻接表。每个节点由其名称索引,并包含一个相邻节点名称的列表。


#### 方法:`add_root_node`

添加原始问题作为根节点。
**参数:**

- `node_content` (str): 用户提出的问题。
- `node_name` (str, 可选): 节点名称,默认为 'root'。


#### 方法:`add_node`

添加搜索子问题节点并返回搜索结果。
**参数:

- `node_name` (str): 节点名称。
- `node_content` (str): 子问题内容。

**返回:**

- `str`: 返回搜索结果。


#### 方法:`add_response_node`

当前获取的信息已经满足问题需求,添加回复节点。

**参数:**

- `node_name` (str, 可选): 节点名称,默认为 'response'。


#### 方法:`add_edge`

添加边。

**参数:**

- `start_node` (str): 起始节点名称。
- `end_node` (str): 结束节点名称。


#### 方法:`reset`

重置节点和边。


#### 方法:`node`

获取节点信息。

```python
def node(self, node_name: str) -> str
```

**参数:**

- `node_name` (str): 节点名称。

**返回:**

- `str`: 返回包含节点信息的字典,包含节点的内容、类型、思考过程(如果有)和前驱节点列表。

## 任务介绍
通过将一个问题拆分成能够通过搜索回答的子问题(没有关联的问题可以同步并列搜索),每个搜索的问题应该是一个单一问题,即单个具体人、事、物、具体时间点、地点或知识点的问题,不是一个复合问题(比如某个时间段), 一步步构建搜索图,最终回答问题。

## Workflow:
  1. 阅读并理解模型输出的皮肤病相关文本内容。
  2. 识别文本中的皮肤病相关实体和潜在的关系。
  3. 确定实体之间的关系,并提取相关属性。
  4. 将识别的实体、关系和属性组织成三元组。
  5. 验证三元组的准确性、相关性和医学专业性。
  6. 存储或输出三元组以供进一步的医学研究和临床决策使用。
  7. 输出应为结构化的三元组列表,每个三元组包含皮肤病相关的实体、关系和属性。

## 注意事项

1. 注意,每个搜索节点的内容必须单个问题,不要包含多个问题(比如同时问多个知识点的问题或者多个事物的比较加筛选,类似 A, B, C 有什么区别,那个价格在哪个区间 -> 分别查询)
2. 不要杜撰搜索结果,要等待代码返回结果
3. 同样的问题不要重复提问,可以在已有问题的基础上继续提问
4. 添加 response 节点的时候,要单独添加,不要和其他节点一起添加,不能同时添加 response 节点和其他节点
5. 一次输出中,不要包含多个代码块,每次只能有一个代码块
6. 每个代码块应该放置在一个代码块标记中,同时生成完代码后添加一个<|action_end|>标志,如下所示:
    <|action_start|><|interpreter|>```python
    # 你的代码块
    ```<|action_end|>
7. 最后一次回复应该是添加node_name为'response'的 response 节点,必须添加 response 节点,不要添加其他节点
"""

GRAPH_PROMPT_EN = """## Character Profile
You are a programmer capable of Python programming in a Jupyter environment. You can utilize the provided API to construct a Web Search Graph, ultimately generating and executing code.

## API Description

Below is the API documentation for the WebSearchGraph class, including detailed attribute descriptions:

### Class: WebSearchGraph

This class manages nodes and edges of a web search graph and conducts searches via a web proxy.

#### Initialization Method

Initializes an instance of WebSearchGraph.

**Attributes:**

- nodes (Dict[str, Dict[str, str]]): A dictionary storing all nodes in the graph. Each node is indexed by its name and contains content, type, and other related information.
- adjacency_list (Dict[str, List[str]]): An adjacency list storing the connections between all nodes in the graph. Each node is indexed by its name and contains a list of adjacent node names.

#### Method: add_root_node

Adds the initial question as the root node.
**Parameters:**

- node_content (str): The user's question.
- node_name (str, optional): The node name, default is 'root'.

#### Method: add_node

Adds a sub-question node and returns search results.
**Parameters:**

- node_name (str): The node name.
- node_content (str): The sub-question content.

**Returns:**

- str: Returns the search results.

#### Method: add_response_node

Adds a response node when the current information satisfies the question's requirements.

**Parameters:**

- node_name (str, optional): The node name, default is 'response'.

#### Method: add_edge

Adds an edge.

**Parameters:**

- start_node (str): The starting node name.
- end_node (str): The ending node name.

#### Method: reset

Resets nodes and edges.

#### Method: node

Get node information.

python
def node(self, node_name: str) -> str

**Parameters:**

- node_name (str): The node name.

**Returns:**

- str: Returns a dictionary containing the node's information, including content, type, thought process (if any), and list of predecessor nodes.

## Task Description
By breaking down a question into sub-questions that can be answered through searches (unrelated questions can be searched concurrently), each search query should be a single question focusing on a specific person, event, object, specific time point, location, or knowledge point. It should not be a compound question (e.g., a time period). Step by step, build the search graph to finally answer the question.

## Workflow:
  1. Read and understand the dermatology-related text content output by the model.
  2. Identify dermatology-related entities and potential relationships in the text.
  3. Determine the relationships between entities and extract relevant attributes.
  4. Organize the identified entities, relationships, and attributes into triples.
  5. Verify the accuracy, relevance, and medical professionalism of the triples.
  6. Store or output the triples for further medical research and clinical decision-making.
  7. OutputFormat: The output should be a structured list of triples, each containing entities, relationships, and attributes related to dermatology.

## Considerations

1. Each search node's content must be a single question; do not include multiple questions (e.g., do not ask multiple knowledge points or compare and filter multiple things simultaneously, like asking for differences between A, B, and C, or price ranges -> query each separately).
2. Do not fabricate search results; wait for the code to return results.
3. Do not repeat the same question; continue asking based on existing questions.
4. When adding a response node, add it separately; do not add a response node and other nodes simultaneously.
5. In a single output, do not include multiple code blocks; only one code block per output.
6. Each code block should be placed within a code block marker, and after generating the code, add an <|action_end|> tag as shown below:
    <|action_start|><|interpreter|>
    ```python
    # Your code block (Note that the 'Get new added node information' logic must be added at the end of the code block, such as 'graph.node('...')')
    ```<|action_end|>
7. The final response should add a response node with node_name 'response', and no other nodes should be added.
"""

graph_fewshot_example_cn = """
## 返回格式示例
<|action_start|><|interpreter|>```python
graph = WebSearchGraph()
graph.add_root_node(node_content="哪家大模型API最便宜?", node_name="root") # 添加原始问题作为根节点
graph.add_node(
        node_name="大模型API提供商", # 节点名称最好有意义
        node_content="目前有哪些主要的大模型API提供商?")
graph.add_node(
        node_name="sub_name_2", # 节点名称最好有意义
        node_content="content of sub_name_2")
...
graph.add_edge(start_node="root", end_node="sub_name_1")
...
graph.node("大模型API提供商"), graph.node("sub_name_2"), ...
```<|action_end|>
"""

graph_fewshot_example_en = """
## Response Format
<|action_start|><|interpreter|>```python
graph = WebSearchGraph()
graph.add_root_node(node_content="Which large model API is the cheapest?", node_name="root") # Add the original question as the root node
graph.add_node(
        node_name="Large Model API Providers", # The node name should be meaningful
        node_content="Who are the main large model API providers currently?")
graph.add_node(
        node_name="sub_name_2", # The node name should be meaningful
        node_content="content of sub_name_2")
...
graph.add_edge(start_node="root", end_node="sub_name_1")
...
# Get node info
graph.node("Large Model API Providers"), graph.node("sub_name_2"), ...
```<|action_end|>
"""

FINAL_RESPONSE_CN = """基于提供的问答对,撰写一篇详细完备的最终回答。
- 回答内容需要逻辑清晰,层次分明,确保读者易于理解。
- 回答中每个关键点需标注引用的搜索结果来源(保持跟问答对中的索引一致),以确保信息的可信度。给出索引的形式为`[[int]]`,如果有多个索引,则用多个[[]]表示,如`[[id_1]][[id_2]]`。
- 回答部分需要全面且完备,不要出现"基于上述内容"等模糊表达,最终呈现的回答不包括提供给你的问答对。
- 回答应为结构化的三元组列表,每个三元组包含皮肤病相关的实体、关系和属性。
- 语言风格需要专业、严谨,避免口语化表达。
- 保持统一的语法和词汇使用,确保整体文档的一致性和连贯性。"""

FINAL_RESPONSE_EN = """Based on the provided Q&A pairs, write a detailed and comprehensive final response.
- The response content should be logically clear and well-structured to ensure reader understanding.
- Each key point in the response should be marked with the source of the search results (consistent with the indices in the Q&A pairs) to ensure information credibility. The index is in the form of `[[int]]`, and if there are multiple indices, use multiple `[[]]`, such as `[[id_1]][[id_2]]`.
- The response should be comprehensive and complete, without vague expressions like "based on the above content". The final response should not include the Q&A pairs provided to you.
- The output should be a structured list of triples, each containing entities, relationships, and attributes related to dermatology.
- The language style should be professional and rigorous, avoiding colloquial expressions.
- Maintain consistent grammar and vocabulary usage to ensure overall document consistency and coherence."""

启动命令 

python -m mindsearch.app --lang cn --model_format internlm_server --search_engine DuckDuckGoSearch

 修改模型路径

internlm_server = dict(type=LMDeployServer,
                       path='internlm/internlm2_5-7b-chat',
                       model_name='internlm2',
                       meta_template=INTERNLM2_META,
                       top_p=0.8,
                       top_k=1,
                       temperature=0,
                       max_new_tokens=8192,
                       repetition_penalty=1.02,
                       stop_words=['<|im_end|>'])
 path='/path/to/your/internlm2_5-7b-chat', 

如果没有修改模型路径

启动前端运行后,会自动下载模型。(一次不行,多执行几次)

 启动

conda activate mindsearch
cd /root/MindSearch
export SILICON_API_KEY='你的  SILICONFLOW API KEY'
export BING_API_KEY='你的 GOOGLE SERPER API KEY'
conda activate mindsearch
cd /root/MindSearch
python -m mindsearch.app --lang cn --model_format internlm_silicon --search_engine GoogleSearch
conda activate mindsearch
 cd /root/MindSearch
streamlit run frontend/mindsearch_streamlit.py

问题:

银屑病是一种慢性炎症性皮肤病,通常表现为红斑和银白色鳞屑。
请输出有关银屑病实体 关系 属性的三元组回答。
  
    
    
    

效果

 推送到魔乐

cp -r /root/MindSearch/mindsearch /root/MindSearch/opulent
cp /root/MindSearch/requirements.txt /root/MindSearch/opulent

 

git add .
git commit -m "space init"
git branch -M main
git push -u origin main

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2186396.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

易贝恩副总经理朱洪泽受邀为第四届中国项目经理大会演讲嘉宾

全国项目经理专业人士年度盛会 北京易贝恩项目管理科技有限公司副总经理朱洪泽女士受邀为PMO评论主办的全国项目经理专业人士年度盛会——2024第四届中国项目经理大会演讲嘉宾&#xff0c;演讲议题为“从手动到智能&#xff1a;项目管理系统助力项目经理提升执行效率”。大会将…

python中的copy方法

记录一下python中的浅拷贝copy和深拷贝deepcopy 例题如下&#xff1a; import copyls [1, 2, [3, 4], 5, 6]ls1 ls.copy()ls2 lsls3 copy.deepcopy(ls)ls[2][1] 0ls.pop(1)ls.append([7, 8])print(ls1) #--------慙1慖print(ls2) #--------慙2慖print(ls3) #------…

windows10或11家庭版实现远程桌面连接控制

远程协助是一种Windows工具&#xff0c;允许控制者使用鼠标和键盘远程控制接受者的计算机&#xff0c;从某种程度上讲&#xff0c;这也是Win10家庭版无法远程桌面的一个有效替代方案。 步骤1. 在使用Windows远程协助之前&#xff0c;您需要先更改某些设置&#xff0c;右键单击…

yolov11模型在bdd100k数据集上的应用【代码+数据集+python环境+训练/应用GUI系统】

yolov8/9/10/11模型在bdd100k数据集上的应用【代码数据集python环境训练/应用GUI系统】 yolov8/9/10/11模型在bdd100k数据集上的应用【代码数据集python环境训练/应用GUI系统】 yolov8/9/10/11模型在bdd100k数据集上的应用【代码数据集python环境训练/应用GUI系统】 bdd100k数据…

Vue3项目开发——新闻发布管理系统(九)(完结篇)

文章目录 十一、用户信息管理1、用户基本资料管理1.1 页面设计1.2 封装接口,更新信息2、更换头像2.1 静态结构2.2 选择图片预览2.3 上传头像3、重置密码3.1 页面设计3.2 封装接口,更新密码十二、项目打包十三、系统全部源码下载十一、用户信息管理 用户信息管理包括功能:基…

软件设计师——信息安全

&#x1f4d4;个人主页&#x1f4da;&#xff1a;秋邱-CSDN博客☀️专属专栏✨&#xff1a;软考——软件设计师&#x1f3c5;往期回顾&#x1f3c6;&#xff1a;软件设计师——计算机网络&#x1f31f;其他专栏&#x1f31f;&#xff1a;C语言_秋邱 ​ 一、加密技术与认证技术…

Redis:初识Redis

Redis&#xff1a;初识Redis Redis 介绍分布式架构Redis特性安装Redis Redis 介绍 在官网中&#xff0c;是如下介绍Redis的&#xff1a; in-memory data store used by millions of developers as a cache, vector database, document database, streaming engine, and messag…

【解锁心灵枷锁】每天焦虑烦躁压抑?这7招助你重拾宁静与阳光!

在这个快节奏、高压力的时代&#xff0c;每个人心中或许都藏着一份不易察觉的焦虑与烦躁&#xff0c;它像一层无形的阴霾&#xff0c;悄悄笼罩着我们的生活&#xff0c;让人感到压抑与无力。但请相信&#xff0c;无论现状多么艰难&#xff0c;总有方法能驱散这些负面情绪&#…

大数据与人工智能:基础与应用的多维思考

大数据与人工智能&#xff1a;基础与应用的多维思考 前言一、时代定位与发展方向二、人工智能的本质与学科融合三、大数据和人工智能的构成要素与大众需求四、计算机系统结构与基础软件的重要性五、研究途径与领域知识的作用六、发展的态度与责任 前言 当下&#xff0c;大数据…

SpringBoot系列 启动流程

文章目录 SpringApplicationSpringApplication#run 启动流程BootstrapContextSpringApplicationRunListenersprepareEnvironmentconfigureEnvironmentconfigurePropertySourcesconfigureProfiles 上下文初始化prepareContextrefreshContextprepareRefreshobtainFreshBeanFactor…

Kotlin 处理字符串和正则表达式(二十一)

导读大纲 1.1 处理字符串和正则表达式1.1.1 分割字符串1.1.2 正则表达式和三引号字符串1.1.3 多行三引号字符串IntelliJ IDEA 和 Android Studio 中三重引号字符串内部的语法高亮显示 1.1 处理字符串和正则表达式 Kotlin 字符串与 Java 字符串完全相同 可以将 Kotlin 代码中创建…

【算法】哈希映射(C/C++)

目录 算法引入&#xff1a; 算法介绍&#xff1a; 优点&#xff1a; 缺点&#xff1a; 哈希映射实现&#xff1a; map unordered_map 题目链接&#xff1a;“蓝桥杯”练习系统 解析&#xff1a; 代码实现&#xff1a; 哈希映射算法是一种通过哈希函数将键映射到数组索…

JAVA基础语法 Day11

一、Set集合 Set特点&#xff1a;无序&#xff08;添加数据的顺序和获取出的数据顺序不一致&#xff09;&#xff0c;不重复&#xff0c;无索引 public class demo1 {public static void main(String[] args) {//1.创建一个集合//HashSet特点&#xff1a;无序&#xff0c;不重…

Redis: 集群架构,优缺点和数据分区方式和算法

集群 集群指的就是一组计算机作为一个整体向用户提供一组网络资源 我就举一个简单的例子&#xff0c;比如百度&#xff0c;在北京和你在上海访问的百度是同一个服务器吗&#xff1f;答案肯定是不是的&#xff0c;每一个应用可以部署在不同的地方&#xff0c;但是我们提供的服务…

C0010.Qt5.15.2下载及安装方法

1. 下载及安装 Qt 添加链接描述下载地址&#xff1a;http://download.qt.io/ 选择 archive 目录 安装Qt **注意&#xff1a;**本人使用的是Qt5.15.2版本&#xff0c;可以按如下方法找到该版本&#xff1b;

华为OD机试 - 信号发射和接收 - 矩阵(Python/JS/C/C++ 2024 E卷 200分)

华为OD机试 2024E卷题库疯狂收录中&#xff0c;刷题点这里 专栏导读 本专栏收录于《华为OD机试真题&#xff08;Python/JS/C/C&#xff09;》。 刷的越多&#xff0c;抽中的概率越大&#xff0c;私信哪吒&#xff0c;备注华为OD&#xff0c;加入华为OD刷题交流群&#xff0c;…

【AIGC】AI时代的数据安全:使用ChatGPT时的自查要点

博客主页&#xff1a; [小ᶻZ࿆] 本文专栏: AIGC | ChatGPT 文章目录 &#x1f4af;前言&#x1f4af;法律法规背景中华人民共和国保守秘密法中华人民共和国网络安全法中华人民共和国个人信息保护法遵守法律法规的重要性 &#x1f4af;ChatGPT的数据使用特点ChatGPT数据安全…

华为OD机试 - 分班问题(Python/JS/C/C++ 2024 E卷 200分)

华为OD机试 2024E卷题库疯狂收录中&#xff0c;刷题点这里 专栏导读 本专栏收录于《华为OD机试真题&#xff08;Python/JS/C/C&#xff09;》。 刷的越多&#xff0c;抽中的概率越大&#xff0c;私信哪吒&#xff0c;备注华为OD&#xff0c;加入华为OD刷题交流群&#xff0c;…

无人机电力巡检:点亮电力巡检新视野!

一、无人机电力巡查的优势 提高巡检效率&#xff1a;无人机可以搭载高清摄像头、红外热像仪等先进设备&#xff0c;实时拍摄和传输图像&#xff0c;帮助巡检人员快速发现潜在问题&#xff0c;如电线破损、绝缘子污损、设备过热等&#xff0c;从而大大缩短了巡检周期。 降低人…

Tiny Transformer:从零开始构建简化版Transformer模型

引言 自然语言处理&#xff08;NLP&#xff09;与计算机视觉&#xff08;CV&#xff09;有显著差异&#xff0c;各自任务的独特性决定了它们适用的模型架构。在CV中&#xff0c;卷积神经网络&#xff08;CNN&#xff09;长期占据主导地位&#xff0c;而在NLP领域&#xff0c;循…