This commit is contained in:
2025-12-27 11:44:50 +08:00
commit ccd43fac1f
1193 changed files with 384161 additions and 0 deletions
@@ -0,0 +1,164 @@
{
"edges":[
{
"fromNode":"e63c7ecc7d262aee",
"fromSide":"right",
"id":"7369442a7b5d66e0",
"styleAttributes":{},
"toNode":"887188af1d31da85",
"toSide":"left"
},
{
"fromNode":"51d753880be94a2d",
"fromSide":"right",
"id":"64a9fadce0614b9a",
"styleAttributes":{},
"toNode":"6ff39169b738088e",
"toSide":"left"
},
{
"fromNode":"51d753880be94a2d",
"fromSide":"right",
"id":"d3943efd8ccc1e2a",
"styleAttributes":{},
"toNode":"265cbe2e0a54ea5b",
"toSide":"left"
},
{
"fromNode":"51d753880be94a2d",
"fromSide":"right",
"id":"3d3aba2aa5c92a82",
"styleAttributes":{},
"toNode":"59a3bdfe32a41fa5",
"toSide":"left"
},
{
"fromNode":"51d753880be94a2d",
"fromSide":"right",
"id":"2ef4c8f1c60ed6d7",
"styleAttributes":{},
"toNode":"e63c7ecc7d262aee",
"toSide":"left"
},
{
"fromNode":"59a3bdfe32a41fa5",
"fromSide":"right",
"id":"4a09aa38feaec8fe",
"styleAttributes":{},
"toNode":"3615d3d907a16d43",
"toSide":"left"
},
{
"fromNode":"265cbe2e0a54ea5b",
"fromSide":"right",
"id":"aecab99420d9eec9",
"styleAttributes":{},
"toNode":"cbbc3892bb2bcadf",
"toSide":"left"
},
{
"fromNode":"cbbc3892bb2bcadf",
"fromSide":"right",
"id":"6a4472d4e0769b6a",
"styleAttributes":{},
"toNode":"f3468ff4204ff01b",
"toSide":"left"
}
],
"metadata":{
"frontmatter":{},
"version":"1.0-1.0"
},
"nodes":[
{
"height":60,
"id":"59a3bdfe32a41fa5",
"styleAttributes":{},
"text":"多用户",
"type":"text",
"width":140,
"x":-100,
"y":-260
},
{
"height":60,
"id":"e63c7ecc7d262aee",
"styleAttributes":{},
"text":"外接模型",
"type":"text",
"width":140,
"x":-100,
"y":-380
},
{
"height":60,
"id":"887188af1d31da85",
"styleAttributes":{},
"text":"连接Ollama",
"type":"text",
"width":145,
"x":120,
"y":-380
},
{
"height":60,
"id":"51d753880be94a2d",
"styleAttributes":{},
"text":"支持功能",
"type":"text",
"width":160,
"x":-400,
"y":-200
},
{
"height":60,
"id":"265cbe2e0a54ea5b",
"styleAttributes":{},
"text":"扩展",
"type":"text",
"width":140,
"x":-100,
"y":-140
},
{
"height":60,
"id":"6ff39169b738088e",
"styleAttributes":{},
"text":"OpenAI兼容接口\nAPIKey 1/用户",
"type":"text",
"width":182,
"x":-100,
"y":-20
},
{
"height":60,
"id":"3615d3d907a16d43",
"styleAttributes":{},
"text":"用户自主注册 后台创建",
"type":"text",
"width":260,
"x":120,
"y":-260
},
{
"height":60,
"id":"cbbc3892bb2bcadf",
"styleAttributes":{},
"text":"知识库 工具",
"type":"text",
"width":168,
"x":120,
"y":-140
},
{
"height":60,
"id":"f3468ff4204ff01b",
"styleAttributes":{},
"text":"开放|自有",
"type":"text",
"width":141,
"x":340,
"y":-140
}
]
}
@@ -0,0 +1,5 @@
``` bash
# 指定模型堂驻内存
$ curl http://127.0.0.1:11434/api/generate -d '{"model":"qwen3-coder:latest", "keep_alive": -1}'
$ curl http://127.0.0.1:11434/api/generate -d '{"model":"qwen2.5:14b", "keep_alive": -1}'
```
@@ -0,0 +1 @@
【本地部署最强OCR大模型olmOCR!支持结构化精准提取复杂PDF文件内容!完美识别中英文文档、模糊扫描件与复杂表格!本地部署与实际测试全过程!医疗法律行业必备-哔哩哔哩】 https://b23.tv/n4v6JDO
@@ -0,0 +1,8 @@
```yml
chatmodel:
  provider: "deepseek"  # 服务提供商(例如:azure/openai
  baseurl: "https://api.deepseek.com"  # API基础地址
  apikey: "sk-ffef52570c5f4834b11580d38552731f"  # API密钥(建议使用环境变量替代)
  model: "deepseek-reasoner"  # 使用的聊天模型名称
```
+11
View File
@@ -0,0 +1,11 @@
```bash
$ docker create --name open-webui -p 3000:8080 \
-v /data/openwebui_home/data:/app/backend/data \
-e OLLAMA_BASE_URL=http://192.168.3.231:11434 \
-e HF_ENDPOINT=https://hf-mirror.com \
--restart always ghcr.goops.top/open-webui/open-webui:main
```
页面刷新慢:因为开着openai的接口,需要在配置里禁掉。
![[OpenWebUI.canvas|OpenWebUI]]
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
---
opp_publish_id: "941389673032228864"
opp_publish_status: published
opp_publish_title: 向量数据库
---
Sqlite
* sqlite_vec
Postgres [[pg_vector && pgvectorscale使用说明]]
* pg-vector
* pg-vectorscale
@@ -0,0 +1,269 @@
{
"edges":[
{"fromNode":"258f55793c08ec9b","fromSide":"bottom","id":"391218fa7e78f94b","toNode":"8bb1d2063a8eee5c","toSide":"top"},
{"fromNode":"7046fe626e6a00c6","fromSide":"bottom","id":"8a7f1613db523f59","toNode":"8d8d274b7e0659bc","toSide":"top"},
{"fromEnd":"arrow","fromNode":"8bb1d2063a8eee5c","fromSide":"right","id":"74a5db9fc5d23a44","label":"匹配","toNode":"8d8d274b7e0659bc","toSide":"left"},
{"fromNode":"6ff6e60699c83ba0","fromSide":"bottom","id":"22ee5d1522146d24","toNode":"51895cca1d63c642","toSide":"top"},
{"fromNode":"04debfe2a686fbd9","fromSide":"bottom","id":"dbd020ffad92f19f","toNode":"ce9b2bf9eaf6f352","toSide":"top"},
{"fromNode":"8d705284d54c4bf8","fromSide":"right","id":"29bbf34481b2cf84","toNode":"9a1235e1dcfd91d5","toSide":"left"},
{"fromNode":"48e5dbe21e9dd690","fromSide":"right","id":"ed564faa07d5a3e0","toNode":"4691e870fa3a13a9","toSide":"left"},
{"fromNode":"e22849b89185cd61","fromSide":"right","id":"9760a31471da1233","toNode":"fadf39c3d47836a8","toSide":"left"},
{"fromNode":"1472033b4b40e3c9","fromSide":"bottom","id":"e0ffdf72232e96ab","toNode":"78a782c53235378b","toSide":"top"}
],
"nodes":[
{
"height":860,
"id":"d92ec6c2200d9b77",
"label":"特征向量的存储-向量数据库",
"styleAttributes":{},
"type":"group",
"width":1120,
"x":-340,
"y":1600
},
{
"height":400,
"id":"60797eca86c1e565",
"label":"场景举例",
"styleAttributes":{},
"type":"group",
"width":1120,
"x":-340,
"y":520
},
{
"height":300,
"id":"324a73f0cc613d91",
"label":"个性化推荐",
"styleAttributes":{},
"type":"group",
"width":1120,
"x":-340,
"y":140
},
{
"height":160,
"id":"1472033b4b40e3c9",
"label":"特征向量的提取-Embedding模型",
"styleAttributes":{},
"type":"group",
"width":1120,
"x":-340,
"y":980
},
{
"height":60,
"id":"258f55793c08ec9b",
"styleAttributes":{},
"text":"用户偏好",
"type":"text",
"width":140,
"x":-220,
"y":200
},
{
"height":60,
"id":"7046fe626e6a00c6",
"styleAttributes":{},
"text":"目标内容",
"type":"text",
"width":140,
"x":500,
"y":200
},
{
"height":621,
"id":"e22849b89185cd61",
"styleAttributes":{},
"text":"##### 多维向量\n* 维度:可以认为是大模型计算出来的基于语义上不同维度的值。\n* 例:广州这夏天,真是让我这东北人没法活。\n\t* 维度一:情感[-1, 1]:强烈得分 0.9 \n\t* 维度二:温度[-1, 1]:热得分 0.88\n\t* 维度三:色温[-1, 1]:暖色 得分 0.91\n\t* 维度四:科技[-1, 1]:不相关得分 0.001\n\t* 维度五:喜好[-1, 1]:厌恶得分 -0.82\n\n##### 向量的距离\n* 在二维空间里,向量的距离是平面上一个线段的距离\n\t* 这个距离越近,两个点的x,y的坐标就越近\n* 在三维空间里,向量的距离是立体空间上两个点的连线\n\t* 这个距离越近,两个点的x,y,z的坐标就越近\n* 在四维、五维,只要是空间,对应维度的向量,都有一个距离。距离越近,相近度越大",
"type":"text",
"width":640,
"x":-340,
"y":-540
},
{
"height":347,
"id":"fadf39c3d47836a8",
"styleAttributes":{},
"text":"##### 感受\n前例:\n* 广州这夏天,真是让我这东北人没法活。\n\n对比例子:\n1. 机房服务器的风扇是真的吵。\n2. 机房没了空调,热得没法呆人了。\n\n相对来说,2描述的场景和前例更加相似。",
"type":"text",
"width":400,
"x":370,
"y":-403
},
{
"height":60,
"id":"8bb1d2063a8eee5c",
"styleAttributes":{},
"text":"多维特征向量",
"type":"text",
"width":180,
"x":-240,
"y":320
},
{
"height":60,
"id":"8d8d274b7e0659bc",
"styleAttributes":{},
"text":"多维特征向量",
"type":"text",
"width":180,
"x":480,
"y":320
},
{
"height":192,
"id":"6ff6e60699c83ba0",
"styleAttributes":{},
"text":"#### 公益租赁平台 - AI中介\n个性化推荐房源:\n1. 用户当前的位置,推荐周边\n2. 用户搜索记录,小区,户型,价位,配套情况,交通偏好",
"type":"text",
"width":503,
"x":-310,
"y":540
},
{
"height":192,
"id":"04debfe2a686fbd9",
"styleAttributes":{},
"text":"#### 公益租赁平台 - 健康咨询\n个性化膳食推荐:\n1. 用户体质评测,匹配食材\n2. 用户搜索记录,食材偏好,料理方式偏好",
"type":"text",
"width":503,
"x":249,
"y":540
},
{
"height":100,
"id":"51895cca1d63c642",
"styleAttributes":{},
"text":"房屋属性:位置,周边,设施,价格,户型 ....",
"type":"text",
"width":503,
"x":-310,
"y":800
},
{
"height":126,
"id":"8d705284d54c4bf8",
"styleAttributes":{},
"text":"* BAAI/bge-m3\n* BAAI/bge-large-zh-v1.5\n* BAAI/bge-large-en-v1.5",
"type":"text",
"width":268,
"x":-312,
"y":1000
},
{
"height":329,
"id":"78a782c53235378b",
"styleAttributes":{},
"text":"\n| **度量方法** | **核心特性** | | **典型应用场景** | **案例参考** |\n| --------- | ------------------- | --- | ----------------------------------------------------- | --------- |\n| **L1距离** | 计算各维度绝对差之和,路径类似网格行走 | | 1. 特征选择(稀疏性)<br>2. 路径规划(网格状移动)<br>3. 鲁棒性要求高的数据分析 | 城市导航、异常检测 |\n| **L2距离** | 计算多维空间中的直线距离 | | 1. 图像特征匹配<br>2. 地理位置计算<br>3. 需要精确几何距离的场景 | 人脸识别、三维建模 |\n| **余弦相似度** | 计算向量夹角的余弦值,忽略向量长度 | | 1. 文本语义相似度<br>2. 用户兴趣推荐(忽略强度差异)<br>3. 高维稀疏数据(如NLP词向量) | 文档检索、广告推荐 |\n",
"type":"text",
"width":1120,
"x":-340,
"y":1200
},
{
"height":138,
"id":"bed4573cdc8d4dc7",
"styleAttributes":{},
"text":"传统数据库扩展\n* Sqlite-vec\n* postgres-vector",
"type":"text",
"width":210,
"x":-312,
"y":1630
},
{
"height":138,
"id":"44e6262f9df1ae6f",
"styleAttributes":{},
"text":"传统数据库扩展\n* Redis\n* MongoDB",
"type":"text",
"width":210,
"x":-38,
"y":1630
},
{
"height":138,
"id":"13bab0d5df168e4a",
"styleAttributes":{},
"text":"服务\n* Pinecone\n* Milvus",
"type":"text",
"width":216,
"x":520,
"y":1630
},
{
"height":138,
"id":"3389fe8228ace3e4",
"styleAttributes":{},
"text":"本地文件\n* chromaDB\n* lanceDB",
"type":"text",
"width":220,
"x":236,
"y":1630
},
{
"height":623,
"id":"019068aae556c2e1",
"styleAttributes":{},
"text":"```sql\ncreate virtual table vec_examples using vec0(\n sample_embedding float[5]\n);\ninsert into vec_examples(rowid, sample_embedding)\n values\n (1, '[-0.200, 0.250, 0.341, -0.211, 0.645'),\n (2, '[0.443, -0.501, 0.355, -0.771, 0.707'),\n (3, '[0.716, -0.927, 0.134, 0.052, -0.669'),\n (4, '[-0.710, 0.330, 0.656, 0.041, -0.990');\n-- KNN style query\nselect rowid,distance from vec_examples\nwhere sample_embedding match '[0.890, 0.544, 0.825, 0.961, 0.358]'\norder by distance\nlimit 2;\n\n/*\n┌───────┬──────────────────┐\n│ rowid │ distance │\n├───────┼──────────────────┤\n│ 2 │ 2.38687372207642 │\n│ 1 │ 2.38978505134583 │\n└───────┴──────────────────┘\n*/\n```\n",
"type":"text",
"width":1072,
"x":-312,
"y":1800
},
{
"height":100,
"id":"ce9b2bf9eaf6f352",
"styleAttributes":{},
"text":"* 膳食:适应人群,适应体质,所用食材,料理方式\n* 方案:面向人群,调养目标 ...",
"type":"text",
"width":503,
"x":249,
"y":800
},
{
"height":60,
"id":"9a1235e1dcfd91d5",
"styleAttributes":{},
"text":"1024",
"type":"text",
"width":100,
"x":-20,
"y":1033
},
{
"height":126,
"id":"3d30185fe259b33e",
"styleAttributes":{},
"text":"* 文本-Embedding\n* 图-Embedding\n* 声音-Embedding\n",
"type":"text",
"width":222,
"x":540,
"y":1000
},
{
"height":126,
"id":"48e5dbe21e9dd690",
"styleAttributes":{},
"text":"* text-embedding-ada-002\n* text-embedding-3-small\n* text-embedding-3-large",
"type":"text",
"width":283,
"x":108,
"y":1000
},
{
"height":60,
"id":"4691e870fa3a13a9",
"styleAttributes":{},
"text":"1536",
"type":"text",
"width":97,
"x":423,
"y":1033
}
],
"metadata":{
"version":"1.0-1.0",
"frontmatter":{}
}
}
+1
View File
@@ -0,0 +1 @@
单机单卡快速训练框架[unsloth](https://www.unsloth.ai/)