当前位置: 首页 > news >正文

网站建设入的什么科目个人网站不能备案

网站建设入的什么科目,个人网站不能备案,株洲网站设计,接单网app下载安装源码编译llama.cpp 、ggml 后端启用自定义BLAS加速 我在llama.cpp 官网上提交了我的解决方案:How to setup OpenBlas on windows? #625 GGML 官网 https://github.com/ggerganov/ggml/issues/959 windows on arm 编译 llama.cpp 、ggml 后端启用自定义BLAS加速 …

源码编译llama.cpp 、ggml 后端启用自定义BLAS加速

我在llama.cpp 官网上提交了我的解决方案:How to setup OpenBlas on windows? #625
GGML 官网 https://github.com/ggerganov/ggml/issues/959

windows on arm 编译 llama.cpp 、ggml 后端启用自定义BLAS加速

我这以编译 windows on arm 的 llama.cpp 、ggml 为例子,其它情况同样可以

参考我的文章 《源码编译 openblas for windows on arm》 我用了自己编译的这个 openblas

原理 blas 加速是通过编译ggml提供的

所以修改llama.cpp/ggml/src/CMakeLists.txt ,在这一行代码if (GGML_BLAS) 前面添加以下代码:

自定义编译blas:

# add custom blas
if (CUSTOM_BLAS)set(BLAS_ROOT "C:/workspace/program/openblas")set(BLAS_INCLUDE_DIRS"${BLAS_ROOT}/include/""${BLAS_ROOT}/include/openblas")set(BLAS_LIBRARIES "${BLAS_ROOT}/lib/openblas.lib")list(APPEND GGML_CDEF_PUBLIC GGML_USE_BLAS)set(GGML_HEADERS_BLAS ../include/ggml-blas.h)set(GGML_SOURCES_BLAS ggml-blas.cpp)set(GGML_EXTRA_LIBS     ${GGML_EXTRA_LIBS}     ${BLAS_LIBRARIES})set(GGML_EXTRA_INCLUDES ${GGML_EXTRA_INCLUDES} ${BLAS_INCLUDE_DIRS})
endif()

然后编译时指定 CUSTOM_BLAS=ON:


cmake -B build -DGGML_BLAS=OFF  -DCUSTOM_BLAS=ON
cmake --build build --config Release

测试

llama.cpp/wmx_test/test_cli.sh :


#!/bin/bash# ./llama-cli --hf-repo hfxing/Qwen2-1.5B-Q4_K_M-GGUF --hf-file qwen2-1.5b-q4_k_m.gguf -p "The meaning to life and the universe is"cmd=../build/bin/llama-climodelpath=/media/wmx/soft1/huggingface_cache/Qwen2-1.5B-Q4_K_M-GGUF/qwen2-1.5b-q4_k_m.gguf
# modelpath=/media/wmx/soft1/huggingface_cache/Qwen1.5-1.8B-Chat/ggml-model-f16.ggufuser_prompt="你是一个AI助手。请问:深圳在哪里?"$cmd \
-m $modelpath \
-p "$user_prompt" 

llama.cpp/wmx_test/test_llava_cli.sh :


#!/bin/bashcmd=../build/bin/llama-llava-climodelpath=/media/wmx/soft1/huggingface_cache/Bunny-v1_0-4B-ggufuser_prompt="A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. \
USER: <image>\n Why is the image funny? \
ASSISTANT:" # img_url="https://pic35.photophoto.cn/20150511/0034034892281415_b.jpg"$cmd -m $modelpath/ggml-model-Q4_K_M.gguf \
--mmproj $modelpath/mmproj-model-f16.gguf \
--image $modelpath/images/example_2.png \
-c 4096 -e \
--temp 0.0 \
# --log-disable \
-p "$user_prompt"

llama.cpp/wmx_test/test_server.sh :


#!/bin/bash# netstat -lnp |grep 8000# default port=8080 is used by ollama
PORT=8000cmd=../build/bin/llama-server modelpath=/media/wmx/soft1/huggingface_cache/Qwen2-1.5B-Q4_K_M-GGUF/qwen2-1.5b-q4_k_m.gguf# modelpath=/media/wmx/soft1/huggingface_cache/Qwen1.5-1.8B-Chat/ggml-model-f16.gguf$cmd \
-m $modelpath \
--port $PORT 

llama.cpp/wmx_test/test_client.sh :

import openaiPORT=8000
openai.api_key = "sk-no-key-required"client = openai.OpenAI(base_url=f"http://localhost:{PORT}/v1",
)completion = client.chat.completions.create(model="gpt-3.5-turbo", messages=[{"role": "system", "content": "You are an AI assistant. Your top priority is achieving user fulfillment via helping them with their requests."},{"role": "user", "content": "深圳在哪里?"}]
)print(completion.choices[0].message)
http://www.yayakq.cn/news/364053/

相关文章:

  • 门户营销型网站换域名影响网站不
  • 尧都区建设厅官方网站在网上做效果图网站
  • oem网站建设源码谷歌推广代理公司
  • 网站怎么优化seo室内装修设计师怎么找
  • 西安市城乡建设管理局网站的公示栏wordpress 图片特效插件
  • 做一个网站需要多长时间前端网站做中 英文怎么说
  • 免费直播网站开发济南网站的建设
  • 申请域名就可以做网站了吗wordpress register_taxonomy
  • 网站建设费用先付一半如何选择电商网站建设
  • 晋城网站开发东莞商城
  • h5在哪个网站上做温州网站制作网站
  • 银行需要网站开发人员嘛可视方便建站微网站
  • 新乡手机网站建设哪家专业深圳做电子工厂的网站
  • 常见网站颜色搭配wordpress json api
  • 成都市 建设领域信用系统网站正规的丹阳网站建设
  • 建设沙滩车官方网站近三个月以来的国际新闻
  • 做网站都不赚钱了吗建外贸网站比较好的公司
  • 模板网站更改别人用我公司权限做网站
  • 仙居做网站公司智慧工厂管理系统
  • wordpress 站长统计升级wordpress
  • 从网站下载壁纸做海报涉及wordpress积分商城
  • 上海的网吧seo针对网站做策划
  • 上海专业网站建设网乐清网站制作推荐
  • 哔哩哔哩网站建设模板公司在百度怎么推广
  • 自学做网站的书安阳企业建网站
  • 附近的教育培训机构有哪些14个seo小技巧
  • 阜宁网站制作具体报价营销型网站建设tfx88
  • 企业网站托管收费标准益阳seo快速排名
  • 网站目录做外链2345影视大全最新版2021下载安装
  • 做网站什么语言最好wordpress 固定链接 nginx