当前位置:   article > 正文

GraphRAG+ollama+LM Studio+chainlit_chainlit 下载不了

chainlit 下载不了

这里我们进一步尝试将embedding模型也换为本地的,同时熟悉一下流程和学一些新的东西

1.环境还是用之前的,这里我们先下载LLM  

然后你会在下载nomic模型的时候崩溃,因为无法搜索,无法下载

解决办法如下
lm studio 0.2.24国内下载模型_lm studio 国内源-CSDN博客

按照上面的教程依旧无法下载模型,但是可以搜索了,没什么用

直接hugging face下载,然后导入llm  models文件夹

C:\Users\Administrator\.cache\lm-studio\models

注意有格式要求

C:\Users\Administrator\.cache\lm-studio\models\Publisher\Repository
将模型放在这个文件夹里才能被识别,然后加在模型

然后修改配置

settings.yaml

  1. ##我这里用到是我的另一个电脑运行LLM Studio ,所以IP是127
  2. encoding_model: cl100k_base
  3. skip_workflows: []
  4. llm:
  5. api_key: ollama
  6. type: openai_chat # or azure_openai_chat
  7. model: llama3
  8. model_supports_json: true # recommended if this is available for your model.
  9. # max_tokens: 4000
  10. # request_timeout: 180.0
  11. api_base: http://127.0.0.1:11434/v1
  12. # api_version: 2024-02-15-preview
  13. # organization: <organization_id>
  14. # deployment_name: <azure_model_deployment_name>
  15. # tokens_per_minute: 150_000 # set a leaky bucket throttle
  16. # requests_per_minute: 10_000 # set a leaky bucket throttle
  17. # max_retries: 10
  18. # max_retry_wait: 10.0
  19. # sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
  20. # concurrent_requests: 25 # the number of parallel inflight requests that may be made
  21. parallelization:
  22. stagger: 0.3
  23. # num_threads: 50 # the number of threads to use for parallel processing
  24. async_mode: threaded # or asyncio
  25. embeddings:
  26. ## parallelization: override the global parallelization settings for embeddings
  27. async_mode: threaded # or asyncio
  28. llm:
  29. api_key: lm-studio
  30. type: openai_embedding # or azure_openai_embedding
  31. model: Publisher/Repository/nomic-embed-text-v1.5.Q5_K_M.gguf
  32. api_base: http://192.168.1.127:1234/v1
  33. # api_version: 2024-02-15-preview
  34. # organization: <organization_id>
  35. # deployment_name: <azure_model_deployment_name>
  36. # tokens_per_minute: 150_000 # set a leaky bucket throttle
  37. # requests_per_minute: 10_000 # set a leaky bucket throttle
  38. # max_retries: 10
  39. # max_retry_wait: 10.0
  40. # sleep_on_rate_limit_recommendation: true # whether to sleep when azure suggests wait-times
  41. # concurrent_requests: 25 # the number of parallel inflight requests that may be made
  42. # batch_size: 16 # the number of documents to send in a single request
  43. # batch_max_tokens: 8191 # the maximum number of tokens to send in a single request
  44. # target: required # or optional
  45. chunks:
  46. size: 300
  47. overlap: 100
  48. group_by_columns: [id] # by default, we don't allow chunks to cross documents
  49. input:
  50. type: file # or blob
  51. file_type: text # or csv
  52. base_dir: "input"
  53. file_encoding: utf-8
  54. file_pattern: ".*\\.txt$"
  55. cache:
  56. type: file # or blob
  57. base_dir: "cache"
  58. # connection_string: <azure_blob_storage_connection_string>
  59. # container_name: <azure_blob_storage_container_name>
  60. storage:
  61. type: file # or blob
  62. base_dir: "output/${timestamp}/artifacts"
  63. # connection_string: <azure_blob_storage_connection_string>
  64. # container_name: <azure_blob_storage_container_name>
  65. reporting:
  66. type: file # or console, blob
  67. base_dir: "output/${timestamp}/reports"
  68. # connection_string: <azure_blob_storage_connection_string>
  69. # container_name: <azure_blob_storage_container_name>
  70. entity_extraction:
  71. ## llm: override the global llm settings for this task
  72. ## parallelization: override the global parallelization settings for this task
  73. ## async_mode: override the global async_mode settings for this task
  74. prompt: "prompts/entity_extraction.txt"
  75. entity_types: [organization,person,geo,event]
  76. max_gleanings: 0
  77. summarize_descriptions:
  78. ## llm: override the global llm settings for this task
  79. ## parallelization: override the global parallelization settings for this task
  80. ## async_mode: override the global async_mode settings for this task
  81. prompt: "prompts/summarize_descriptions.txt"
  82. max_length: 500
  83. claim_extraction:
  84. ## llm: override the global llm settings for this task
  85. ## parallelization: override the global parallelization settings for this task
  86. ## async_mode: override the global async_mode settings for this task
  87. # enabled: true
  88. prompt: "prompts/claim_extraction.txt"
  89. description: "Any claims or facts that could be relevant to information discovery."
  90. max_gleanings: 0
  91. community_report:
  92. ## llm: override the global llm settings for this task
  93. ## parallelization: override the global parallelization settings for this task
  94. ## async_mode: override the global async_mode settings for this task
  95. prompt: "prompts/community_report.txt"
  96. max_length: 2000
  97. max_input_length: 8000
  98. cluster_graph:
  99. max_cluster_size: 10
  100. embed_graph:
  101. enabled: false # if true, will generate node2vec embeddings for nodes
  102. # num_walks: 10
  103. # walk_length: 40
  104. # window_size: 2
  105. # iterations: 3
  106. # random_seed: 597832
  107. umap:
  108. enabled: false # if true, will generate UMAP embeddings for nodes
  109. snapshots:
  110. graphml: false
  111. raw_entities: false
  112. top_level_nodes: false
  113. local_search:
  114. # text_unit_prop: 0.5
  115. # community_prop: 0.1
  116. # conversation_history_max_turns: 5
  117. # top_k_mapped_entities: 10
  118. # top_k_relationships: 10
  119. # max_tokens: 12000
  120. global_search:
  121. # max_tokens: 12000
  122. # data_max_tokens: 12000
  123. # map_max_tokens: 1000
  124. # reduce_max_tokens: 2000
  125. # concurrency: 32

pdf转markdown,markdown转txt

  1. #测试文档 https://github.com/win4r/mytest/blob/main/book.pdf
  2. pip install marker-pdf
  3. marker_single ./book.pdf ./pdftxt --batch_multiplier 2 --max_pages 60 --langs English
  4. #markdown转txt
  5. python markdown_to_text.py book.md book.txt
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/901158
推荐阅读
相关标签
  

闽ICP备14008679号