mirror of
https://github.com/xming521/WeClone.git
synced 2026-08-29 02:10:55 +08:00
更新README文档;修改清理策略中的评分解析逻辑。
This commit is contained in:
@@ -55,12 +55,13 @@
|
||||
|
||||
### Recent Updates
|
||||
[25/06/05] Support for image modal data fine-tuning
|
||||
[25/07/10] Data source added Telegram
|
||||
|
||||
### Hardware Requirements
|
||||
|
||||
The project uses Qwen2.5-VL-7B-Instruct model by default with LoRA method for SFT stage fine-tuning. You can also use other models and methods supported by [LLaMA Factory](https://github.com/hiyouga/LLaMA-Factory/tree/main#supported-models).
|
||||
|
||||
Estimated VRAM requirements (text-only large model memory usage as follows, vision models increase based on image quantity and size):
|
||||
Estimated VRAM requirements:
|
||||
| Method | Precision | 7B | 14B | 30B | 70B | `x`B |
|
||||
| ------------------------------- | --------- | ----- | ----- | ----- | ------ | ------- |
|
||||
| Full (`bf16` or `fp16`) | 32 | 120GB | 240GB | 600GB | 1200GB | `18x`GB |
|
||||
@@ -162,9 +163,12 @@ weclone-cli server
|
||||
weclone-cli test-model
|
||||
```
|
||||
|
||||
## 🖼️ Fine-tuning Results
|
||||
## 🖼️ Results Showcase
|
||||
> [!TIP]
|
||||
> **英文例子怎么发 More cases can be found on [XiaoHongShu](https://www.xiaohongshu.com/user/profile/628109730000000021029de4)**
|
||||
> **We're looking for interesting examples of native English speakers chatting with WeClone! Feel free to share them with us on Twitter.
|
||||
|
||||
???
|
||||
More cases can be found on [XiaoHongShu](https://www.xiaohongshu.com/user/profile/628109730000000021029de4)**
|
||||
|
||||
Using the Qwen2.5VL 32B model with approximately 10,000 processed effective data samples, the loss was reduced to around 3.6:
|
||||
<details>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
### 近期更新
|
||||
[25/06/05]支持图片模态数据微调
|
||||
[25/07/10]数据源增加Telegram
|
||||
|
||||
### 硬件要求
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ class OnlineLLM:
|
||||
temperature=temperature,
|
||||
max_tokens=max_tokens,
|
||||
top_p=top_p,
|
||||
# enable_thinking=enable_thinking Adapt Qwen3 dynamic reasoning activation
|
||||
)
|
||||
|
||||
return response
|
||||
|
||||
@@ -10,7 +10,7 @@ from langchain_core.prompts import PromptTemplate
|
||||
from tqdm import tqdm
|
||||
|
||||
from weclone.core.inference.online_infer import OnlineLLM
|
||||
from weclone.data.models import QaPair, QaPairScore
|
||||
from weclone.data.models import QaPair, QaPairScore, QaPairScoreWithId
|
||||
from weclone.prompts.clean_data import CLEAN_PROMPT, ONLINE_LLM_CLEAN_PROMPT
|
||||
from weclone.utils.config_models import WCMakeDatasetConfig
|
||||
from weclone.utils.log import logger
|
||||
@@ -175,7 +175,7 @@ class OlineLLMCleaningStrategy(CleaningStrategy):
|
||||
# Fill template
|
||||
prompt_text = prompt_template.invoke({"qa_list": qa_list_json}).text
|
||||
try:
|
||||
response = client.chat(prompt_text)
|
||||
response = client.chat(prompt_text, temperature=0)
|
||||
result_text = response.choices[0].message.content
|
||||
# print("Model response:",result_text)
|
||||
# If there is <think> … </think>, keep only the content after </think>
|
||||
@@ -191,7 +191,7 @@ class OlineLLMCleaningStrategy(CleaningStrategy):
|
||||
continue
|
||||
|
||||
for item in score_list:
|
||||
parsed_scores.append(QaPairScore(**item))
|
||||
parsed_scores.append(QaPairScoreWithId(**item))
|
||||
except Exception as e:
|
||||
ids_in_batch = [qa["id"] for qa in qa_list]
|
||||
logger.error(
|
||||
|
||||
@@ -50,6 +50,10 @@ class QaPairScore(BaseModel):
|
||||
score: int = Field(ge=1, le=5)
|
||||
|
||||
|
||||
class QaPairScoreWithId(QaPairScore):
|
||||
id: int
|
||||
|
||||
|
||||
cut_type_data = {
|
||||
"zh_CN": [
|
||||
"Cut",
|
||||
|
||||
Reference in New Issue
Block a user