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

html网站支付链接怎么做的友情链接交易平台

html网站支付链接怎么做的,友情链接交易平台,网站是用什么软件做的,微信公众号可以做什么每一篇文章前后都增加返回目录 回到目录 【评测】Qwen3-Embedding模型初体验 模型的介绍页面 本机配置:八代i5-8265U,16G内存,无GPU核显运行,win10操作系统 ollama可以通过下面命令拉取模型: ollama pull modelscope…

每一篇文章前后都增加返回目录
回到目录

【评测】Qwen3-Embedding模型初体验

模型的介绍页面
本机配置:八代i5-8265U,16G内存,无GPU核显运行,win10操作系统
ollama可以通过下面命令拉取模型:
ollama pull modelscope.cn/Qwen/Qwen3-Embedding-8B-GGUF
下面直接使用介绍页面的sample代码体验一下模型的威力。

1. modelscope下载模型

$ modelscope download --model Qwen/Qwen3-Embedding-0.6B
$ modelscope download --model Qwen/Qwen3-Embedding-8B
0.6B模型 1.12GB 8B模型 14.1GB

2. 修改sample代码从本地加载模型

默认代码运行报错:
OSError: We couldn’t connect to ‘https://huggingface.co’ to load the files, and couldn’t find them in the cached files.

# test_qwen3-embedding.py# Requires transformers>=4.51.0
# Requires sentence-transformers>=2.7.0from sentence_transformers import SentenceTransformer# Load the model
#model = SentenceTransformer("Qwen/Qwen3-Embedding-8B")  改为下面代码本地加载模型
model = SentenceTransformer("C:\\Users\\Administrator\\.cache\\modelscope\\hub\models\\Qwen\\Qwen3-Embedding-8B")# We recommend enabling flash_attention_2 for better acceleration and memory saving,
# together with setting `padding_side` to "left":
# model = SentenceTransformer(
#     "Qwen/Qwen3-Embedding-8B",
#     model_kwargs={"attn_implementation": "flash_attention_2", "device_map": "auto"},
#     tokenizer_kwargs={"padding_side": "left"},
# )# The queries and documents to embed
queries = ["What is the capital of China?","Explain gravity",
]
documents = ["The capital of China is Beijing.","Gravity is a force that attracts two bodies towards each other. It gives weight to physical objects and is responsible for the movement of planets around the sun.",
]# Encode the queries and documents. Note that queries benefit from using a prompt
# Here we use the prompt called "query" stored under `model.prompts`, but you can
# also pass your own prompt via the `prompt` argument
query_embeddings = model.encode(queries, prompt_name="query")
document_embeddings = model.encode(documents)# Compute the (cosine) similarity between the query and document embeddings
similarity = model.similarity(query_embeddings, document_embeddings)
print(similarity)
# tensor([[0.7493, 0.0751],
#         [0.0880, 0.6318]])

可能是机器配置太低问题,无法正常执行出结果
D:\workspace\test_qwen3-embedding.py:8: SyntaxWarning: invalid escape sequence ‘\m’
model = SentenceTransformer(“C:\Users\Administrator\.cache\modelscope\hub\models\Qwen\Qwen3-Embedding-8B”)
Loading checkpoint shards: 25%|██████████████▎ | 1/4 [00:14<00:42, 14.24s/it]

3. 修改sample代码为0.6B模型

# test_qwen3-embedding.py
。。。
# Load the model
#model = SentenceTransformer("Qwen/Qwen3-Embedding-8B")  改为下面代码本地加载模型
model = SentenceTransformer("C:\\Users\\Administrator\\.cache\\modelscope\\hub\models\\Qwen\\Qwen3-Embedding-8B")
。。。

(workspace) PS D:\workspace> uv run .\test_qwen3-embedding.py
D:\workspace\test_qwen3-embedding.py:8: SyntaxWarning: invalid escape sequence ‘\m’
model = SentenceTransformer(“C:\Users\Administrator\.cache\modelscope\hub\models\Qwen\Qwen3-Embedding-0.6B”)
tensor([[0.7646, 0.1414],
[0.1355, 0.6000]])

运行成功,几秒钟出结果,CPU呼呼的转,最终效果可以接受吗?

每一篇文章前后都增加返回目录
回到目录

http://www.cadmedia.cn/news/9183.html

相关文章:

  • 衢州品牌网站设计网络广告营销方案
  • wordpress外部链接厦门seo网络推广
  • 网站后台漏洞长沙seo就选智优营家
  • 域名是什么样式的深圳seo网络优化公司
  • 国家高新技术企业是国企吗?优化网站链接的方法
  • 做矿产公司的网站网络营销课程去哪里学
  • amp网站建设网页设计制作网站代码
  • 做网站需要什么语言楚雄seo
  • 网站开发与网站建设电商培训大概多少学费
  • 珠海哪里有网站建设广告公司推广渠道
  • 视频直播nba漳州seo网站快速排名
  • 传奇类游戏网站国际新闻最新消息今天 新闻
  • 降低宁波seo外包优化公司
  • 自己做的动态网站怎么怎么把产品快速宣传并推广
  • 江西建设局网站代码编程教学入门
  • 专业网站设计公司和普通设计公司的区别今日新闻最新
  • 辽阳市城市建设档案馆网站贵阳网站建设推广
  • 岳阳网站建设seo应该怎么做
  • 网站优化定做网络营销模式
  • 网站地址解析快抖霸屏乐云seo
  • 北京工商注册核名如何做网站优化seo
  • 做滚动图的免费网站成都网络优化公司有哪些
  • 网站广告怎么做怎么可以让百度快速收录视频
  • 中国佛山手机网站建设微信公众号seo
  • 重庆响应式网站制作百度竞价怎么做开户需要多少钱
  • 郴州网站建设价格网络流量分析工具
  • 郑州本地网站产品推广计划方案
  • 代挂QQ建设网站百度网址导航
  • 网站建设的关键词湖北seo网站推广
  • 物流企业网站建设步骤注册网站多少钱