WeClone README

README проекта с github.com/xming521/WeClone. Одним файлом markdown: README.md.

WeClone

Build a portrait of your life. Assistants that know you better. Clones that sound more like you.

GitHub stars GitHub release Telegram Twitter 小红书 WeClone①

Featured|HelloGitHub xming521%2FWeClone | Trendshift

简体中文| English| Project Homepage | Documentation

WeClone distills your identity, goals, preferences and current situation from your digital life into a life portrait, organized into domains such as work, family and health, that you can review, trace and share on your own terms. The portrait serves as long-term memory for your personal assistants and will power clones with your personal style.

Life portrait in the web UI

✨ Core Features

WeClone feature overview

[!NOTE] WeClone now goes beyond fine-tuned clones. The original fine-tuning workflow remains fully supported, see Fine-tuned clone.

The portrait and its extraction prompts are currently in Chinese, and English chats have not been tested yet. The web UI is available in English and Chinese.

📰 Recent Updates

📥 Supported Data Sources

The life portrait reads text messages only. The table shows the message types the fine-tuned clone supports. See Preparing data for exporting and setup.

Platform Text Images Voice Video Animated Emojis/Stickers Links (Sharing) Quote Forward Location Files
Telegram ✅ ✅ ❌ ❌ ⚠️ Converted to Emoji ❌ ❌ ✅ ✅ ❌
WhatsApp 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
Discord 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
Slack 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧

Chats from other platforms can be converted to WeClone's generic CSV format and placed in dataset/csv/. See Preparing Data on the docs site for the format.

🚀 Quick Start

1. Install

Python 3.12 is required. uv is recommended:

git clone https://github.com/xming521/WeClone.git && cd WeClone
uv venv .venv --python=3.12
source .venv/bin/activate   # Windows: .venv\Scripts\activate
uv pip install -e .
cp settings.template.jsonc settings.jsonc

All settings live in settings.jsonc. The base install is enough to build your portrait and connect personal assistants. By default the portrait is extracted through the Codex CLI, which must be installed and signed in. Any OpenAI-compatible API works as well, see Installation and configuration.

2. Prepare your data

Telegram chats are supported today. Export them as JSON with Telegram Desktop, put the ChatExport_* folders in dataset/telegram/, then set platform to telegram and telegram_args.my_id to your user ID in settings.jsonc. Chats from other platforms can be converted to the generic CSV format and placed in dataset/csv/. See Preparing data.

3. Build your portrait and connect personal assistants

weclone-cli server

Open http://127.0.0.1:5175, set a password, and build your portrait on the Build portrait page, which checks the setup and shows the progress. Then review your portrait fact by fact, approve the summaries on the Portrait summary page, then generate a token on the Assistants page and run the commands it shows for Claude Code or Codex. You can also copy the export text on the Portrait summary page into an assistant's memory. See Life portrait and assistants.

4. Fine-tune a clone

An NVIDIA GPU is required. The default Qwen2.5-7B-Instruct with LoRA needs about 16GB of VRAM. Install the dependencies and download the model as described in Fine-tuned clone, then run:

weclone-cli make-dataset                     # build training data, filtering personal information
weclone-cli train-sft                        # LoRA fine-tuning
weclone-cli server --inference --port 8005   # OpenAI-compatible API

Connect the trained clone to chat platforms through AstrBot or LangBot, see Chat bots.

🔒 Privacy and Security

See Security.

🏗️ Architecture

Show the architecture diagram: the modules, the data flow and the files each step writes. Click it for the full-size image. WeClone architecture and implementation

📚 Documentation

Document Covers
Installation and configuration What to install, model backend, speaking style and fine-tuning dependencies
Preparing data Supported sources, Telegram export, generic CSV format
Life portrait and assistants build-profile, web review, portrait summary, MCP
Fine-tuned clone Hardware, model download, training data, training and inference
Chat bots Bot token, AstrBot, LangBot
Security Storage modes, password, keys and tokens, request logs

Full tutorials, configuration reference and FAQ are on the documentation site.

📌 Roadmap

💬 Troubleshooting

❤️ Contributing

Issues and pull requests are welcome, and so is help reviewing PRs. Please discuss new features in an issue first. See the contributing guide for the development environment, tests and frontend builds.

🙏 Acknowledgments

Thanks to BUPT VCIS Lab for its support, and to the following code contributors and other community members for their contributions.

This project also benefits from excellent open source projects such as LLaMA-Factory, AstrBot, LangBot, and others.

Powered by DartNode

⚠️ Disclaimer

[!IMPORTANT] This project is intended for learning and research. Assess the risks yourself before using it in production or offering it as a service.

Click to view the disclaimer terms
  • Provided as is: the project comes without warranties of any kind. The authors are not liable for any direct or indirect loss arising from its use and do not commit to ongoing maintenance or support.
  • Data and consent: chat history contains other people's messages. Make sure that collecting and using the data complies with local laws and that the people involved have consented.
  • Portrait extraction by LLMs: while your portrait is built, chat content, including the other side's messages, is sent to the model service you configured and handled under that service's data policy. Choose a provider you trust and check its data retention and training terms. Leave chats you don't want sent out of the data directory.
  • Portrait content: the portrait collects and infers personal information about you, touches on the people around you, and may include sensitive topics such as health or relationships. Keep result directories and exported files safe, and review the portrait before giving assistants access.
  • Model output: portraits, summaries and clone replies are generated by models. They may be inaccurate and do not represent the real views of you or anyone else.
  • AI disclosure: when a clone talks to other people, make clear that it is an AI so that no one mistakes it for a real person.
  • Lawful use: do not use this project for any unlawful purpose.

This disclaimer may be revised as the project evolves.

⭐ Star History

[!TIP] If this project is helpful to you, or if you are interested in the future development of this project, please give the project a Star, thank you

Star History Chart

We clone, soul and all.

WeClone (xming521/WeClone)

Ищем в базе…

Что это такое?WeClone — это open-source набор инструментов, который превращает вашу историю чатов в AI-двойника: он дообучает LLM на ваших собственных сообщениях, чтобы чат-бот отвечал в вашем личном стиле.
Так что именно я устанавливаю — приложение или кучу скриптов?Консольный пайплайн на Python: предобработка данных, LoRA-дообучение на базе LLaMA Factory, демо в браузере для тестирования и API-сервер, который запускается через weclone-cli. Все настройки обучения и инференса лежат в одном файле settings.jsonc.
Как его запустить?Установите CUDA 12.6+ и менеджер пакетов uv, склонируйте репозиторий, позвольте uv создать окружение Python и установить зависимости, скопируйте шаблон конфигурации в settings.jsonc, а затем скачайте модель по умолчанию с Hugging Face.
Какие сейчас есть шероховатости?Проект активно развивается: результаты 7B описывают как средние (модели 14B+ справляются лучше), Windows не тестировалась, поэтому рекомендуется WSL, а дообученная модель не умеет вызывать инструменты — плагины с tool calling у бота придётся отключить.
В моей истории чатов полно личных данных — как с этим обращаются?Всё работает локально. Microsoft Presidio удаляет из данных номера телефонов, адреса электронной почты, номера карт, IP-адреса, названия мест и адреса криптокошельков, плюс есть ручной блок-лист — но авторы предупреждают, что эта фильтрация не гарантирует стопроцентной полноты.
Есть ли подвох в лицензии?Лицензия — AGPL-3.0, и в README подчёркивается, что проект предназначен для обучения, исследований и экспериментов — использование в продакшене несёт серьёзные риски, которые вы берёте на себя.
Мне нужна мощная видеокарта для этого?Для локального обучения — да: модели 7B по умолчанию с LoRA нужно около 16 ГБ видеопамяти, хотя 4-битный QLoRA умещает её примерно в 6 ГБ. Полное дообучение более крупных моделей требует намного больше памяти.
Он учится и на картинках, или только на тексте?Картинки работают: дообучение поддерживает изображения, а модель Qwen2.5-VL по умолчанию умеет работать с картинками, так что отправленные вами фотографии тоже повлияют на двойника.
Из каких мессенджеров он может импортировать историю и в каких отвечать?Сейчас можно импортировать чаты Telegram (текст, изображения, пересланные сообщения, геолокацию; голосовые и видео игнорируются). Для работы бот подключается к Telegram, Discord, Slack и личным аккаунтам WeChat; импорт из WhatsApp, Discord и Slack ещё в разработке.
Как скормить ему мою историю из Telegram?В Telegram Desktop откройте чат, нажмите Export chat history, выберите Photos как тип сообщений и JSON как формат, затем положите экспортированные папки внутрь ./dataset/telegram. Групповые чаты использовать не рекомендуется.
Что ещё запланировано в дорожной карте?Поддержка памяти, более широкий контекст (участники, время), больше источников данных, аугментация данных, графический интерфейс и цепочки рассуждений (Chain-of-Thought); поддержка картинок (multimodal) уже реализована.
Какие есть похожие проекты?unsloth, jiuwenswarm, brigade, opensquilla, MetaClaw, LangBot, nanobot, Soup
Автор
xming521
Размер
12.4 MB
Звёзды
18.4K
Возраст
2 г
Коммиты · 90 дней