Author: admin
-
LeetCode: 268 Missing Number
•
Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array. Example: Input: nums = [3,0,1] Output: 2 Explanation: n = 3 since there are 3 numbers, so all numbers are in the range [0,3].…
-
LeetCode: 191 Number of 1 Bits
•
Here’s a detailed explanation and solution for LeetCode 191: Number of 1 Bits, with explanations provided in both English and Chinese, line by line. Problem Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight). Example: Input:…
-
Artificial Intelligence 101: RNN and NLP
•
RNN和自然语言处理 Recurrent Neural Networks (RNNs) have been a foundational architecture in the field of natural language processing (NLP) for many years. They are particularly well-suited for tasks that involve sequential data, where the order of elements (such as words in a sentence) is critical. RNNs can maintain a hidden state…
-
Artificial Intelligence 101: Tokenizer and One-Hot
•
AI中的分词器与One-Hot编码 In natural language processing (NLP) and machine learning, preparing textual data for model training involves converting text into numerical representations that can be processed by algorithms. Two fundamental techniques used for this are tokenization and one-hot encoding. Understanding how these methods work and when to use them is essential…
-
LeetCode: 572 Subtree of Another Tree
•
Given the roots of two binary trees root and subRoot, write a function to determine if subRoot is a subtree of root. A subtree of a binary tree T is a tree that consists of a node in T and all of this node’s descendants. The tree T could also…
-
Artificial Intelligence 101: Practical Example of Fine-Tuning to Reduce Legal Document Generation Hallucination
•
实际案例:通过微调减少法律文件生成中的幻觉 Legal document generation is a critical task that requires a high level of accuracy and reliability, especially when dealing with legal precedents, statutes, and contracts. AI models that generate legal documents must avoid hallucinations—instances where the model creates incorrect or fabricated information, such as inventing legal precedents or misquoting…
-
Artificial Intelligence 101: Overfitting in AI Fine-Tuning
•
人工智能微调中的过拟合 Overfitting in AI fine-tuning occurs when a model becomes too closely aligned with the specific details of the fine-tuning dataset, to the point that it performs exceptionally well on that data but poorly on new, unseen data. In fine-tuning, the model adjusts its parameters based on the smaller, task-specific…
-
Artificial Intelligence 101: How Can Fine-Tuning Reduce AI Hallucination
•
减少人工智能幻觉 Fine-tuning can play a critical role in reducing AI hallucinations by adapting a pre-trained model more closely to a specific task or domain. Hallucinations in AI, where the model generates incorrect or fabricated information, often occur due to the model’s reliance on generalized patterns learned from a broad and…
-
Artificial Intelligence 101: AI Fine-Tuning
•
人工智能微调 AI fine-tuning is a process in machine learning where a pre-trained model, such as a neural network or a large language model, is further trained on a smaller, task-specific dataset. This allows the model to adapt to specific tasks or domains without needing to be trained from scratch. Fine-tuning…