This commit is contained in:
2025-12-31 16:00:29 +00:00
commit 3688f93d5d
310 changed files with 93400 additions and 0 deletions

326
2025/03/08/llm2.html Normal file
View File

@@ -0,0 +1,326 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>近期LLM的部署与应用经历(2) | Mayx的博客</title>
<meta name="generator" content="Jekyll v3.9.5" />
<meta property="og:title" content="近期LLM的部署与应用经历(2)" />
<meta name="author" content="mayx" />
<meta property="og:locale" content="zh_CN" />
<meta name="description" content="最近AI发展好快啊" />
<meta property="og:description" content="最近AI发展好快啊" />
<meta property="og:site_name" content="Mayx的博客" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2025-03-08T00:00:00+08:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="近期LLM的部署与应用经历(2)" />
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
<meta name="yandex-verification" content="fc0e535abed800be" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2025-03-08T00:00:00+08:00","datePublished":"2025-03-08T00:00:00+08:00","description":"最近AI发展好快啊","headline":"近期LLM的部署与应用经历(2)","mainEntityOfPage":{"@type":"WebPage","@id":"/2025/03/08/llm2.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2025/03/08/llm2.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="canonical" href="https://mabbs.github.io/2025/03/08/llm2.html" />
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
<link rel="stylesheet" href="/assets/css/style.css?v=1767196818" />
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<!-- <![endif]-->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
<link rel="me" href="https://github.com/Mabbs" />
<script src="/assets/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var lastUpdated = new Date("Thu, 01 Jan 2026 00:00:18 +0800");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
<!--[if !IE]> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137710294-1');
</script>
<script src="/assets/js/instant.page.js" type="module"></script>
<!-- <![endif]-->
</head>
<body>
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript这不影响你的浏览但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer这不影响你的浏览但可能会有一些功能无法使用……</small></marquee><![endif]-->
<div class="wrapper">
<header class="h-card">
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
<p class="p-note">Mayx's Home Page</p>
<form action="/search.html">
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." />&#160;<input type="submit" value="搜索" />
</form>
<br />
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
<ul class="downloads">
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
</ul>
</header>
<section class="h-entry">
<small><time class="date dt-published" datetime="2025-03-08T00:00:00+08:00">8 March 2025</time> - 字数统计2426 - 阅读大约需要8分钟 - Hits: <span id="/2025/03/08/llm2.html" class="visitors">Loading...</span></small>
<h1 class="p-name">近期LLM的部署与应用经历(2)</h1>
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
<div id="outdate" style="display:none;">
<hr /><p>
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
</p>
</div>
<script>
daysold = Math.floor((new Date().getTime() - new Date("Sat, 08 Mar 2025 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
</script>
<hr />
<b>AI摘要</b>
<p id="ai-output">这篇文章讲述了近期阿里推出的QwQ模型的更新该模型以32b参数达到DeepSeek-R1 671b的水平且参数量更小成本更低。作者试用后发现QwQ在某些问题上的回答与DeepSeek-R1相似但解析文本和更宽泛问题的能力还有待提高且存在一些小问题如无闭合标签。QwQ模型的一个优势是支持Agent能力但相比DeepSeek-R1在技术含量和成熟度上还有差距。文章还提到了Mac Studio的发布它提供了更经济的选项来运行DeepSeek-R1但新产品的实际效果还需进一步验证。作者还分享了解除MaxKB限制的方法指出MaxKB在开源性上有不足。最后作者感慨AI发展迅速但同时也强调了AI研究和应用的高门槛。</p>
<hr />
<ul><li><a href="#起因">起因</a></li><li><a href="#关于阿里qwq模型的体验">关于阿里QwQ模型的体验</a></li><li><a href="#关于新出的mac-studio的看法">关于新出的Mac Studio的看法</a></li><li><a href="#关于如何查看maxkb的完整接口文档">关于如何查看MaxKB的完整接口文档</a></li><li><a href="#感想">感想</a></li></ul>
<hr />
<main class="post-content e-content" role="main"><p>最近AI发展好快啊<!--more--></p>
<h1 id="起因">
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
</h1>
<p>自从<a href="/2025/02/22/llm.html">上次</a>写完文章之后最近这段时间LLM圈又有了不少更新感觉很值得试试看。所以这次就来看看这些新东西有什么特别的地方吧。</p>
<h1 id="关于阿里qwq模型的体验">
<a href="#关于阿里qwq模型的体验"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 关于阿里QwQ模型的体验
</h1>
<p>前两天阿里的推理模型QwQ模型更新到正式版了不过其实我也没试过他们的预览版效果怎么样……但按照他们的说法他们的32b参数的模型水平已经相当于DeepSeek-R1 671b的模型了。如果真是这样那就太好了毕竟那个671b参数的模型部署难度还是相当大的在当时想部署一个能用级别的还是挺烧钱的。但如果这个32b参数的模型能达到相同水平那就完全没有必要买那么贵的硬件了。像上次买的RTX4090 48GiB显存魔改版可以轻松跑QwQ 32b Q8量化的版本速度能达到23T/s就算想跑没有量化的fp16版也只需要再买一张RTX4090 48GiB就够了这个成本相比DeepSeek-R1低太多了。 </p><p>
所以刚发布的那天我下午就把模型下载下来试了试随便试了几个问题答得效果确实不错我对比了一下DeepSeek-R1试了试“世界上最长的单词中哪个字母最多”这个问题两边回答的格式几乎一样都说的是“硅肺病”的英文并且都进行了字母数量分析主要的结论都分析正确了但是第二多和第三多的字母数量两边说的都不完全正确。另外我还试了试DeepSeek-R1的14b和70b蒸馏版虽然回答正确了但是并没有分析具体字母的数量所以从这一点来看确实是和DeepSeek-R1的水平很相似。不过后来我又让其他人试了试文本分析之类的能力似乎没能达到他们的预期另外我还测了测比较宽泛的问题以及解析文本之类的问题结果很多问题没能正确回答……所以还是不能和DeepSeek-R1相比较不过相比DeepSeek-R1各个蒸馏版的水平还是强了不少的至少没有出现在回答结果中随机输出英文的情况但是偶尔会出现没有闭合标签“&lt;/think&gt;”的情况看起来应该不能用于生产环境……要想正经用还是得用完整版的DeepSeek-R1但毕竟成本问题还是很大啊……所以如果需要考虑成本问题的话用QwQ还是很不错的选择。 </p><p>
不过QwQ相比DeepSeek-R1还有一个优势那就是支持Agent能力原生支持调用用户提供的函数像它虽然解析文本的能力不怎么强但是它可以调用工具来处理而DeepSeek-R1要想支持就得写提示词但是毕竟没有专门训练过不一定能正确使用工具虽然我没试过😝</p><p>
另外说到Agent好像有个叫“Manus”的产品挺火但那个我实在没兴趣一点技术含量都没有还搞什么邀请码一看就是买的水军而且还被人不到一天时间实现了开源版<a href="https://github.com/mannaandpoem/OpenManus">OpenManus</a>,给人笑掉大牙了🤣。</p>
<h1 id="关于新出的mac-studio的看法">
<a href="#关于新出的mac-studio的看法"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 关于新出的Mac Studio的看法
</h1>
<p>搭完整版的DeepSeek-R1即使是使用上次所说的<a href="https://github.com/kvcache-ai/ktransformers">KTransformers</a>框架也是相当费钱的最起码也得10万CNY左右。但最近几天苹果出了新的Mac Studio最高配的M3 Ultra可以选配512GiB的内存可以轻松跑DeepSeek-R1 671b Q4_K的版本然后价格最低仅需7.5万CNY。我之前还想着是出M4 Ultra呢……结果出了个M4 Max不过新的Mac Studio出的速度比我预期的快了好多我本来以为会在WWDC25的时候出呢……看来是想借DeepSeek-R1大卖一波当然从这个产品来说确实应该是会大卖的回头看看能不能搞一个来。不过现在才刚开售还没人拿到实物呢也没人实机跑一下所以先等等最早买到的人跑一波看看如果效果好的话也许能整一个呢……</p>
<h1 id="关于如何查看maxkb的完整接口文档">
<a href="#关于如何查看maxkb的完整接口文档"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 关于如何查看MaxKB的完整接口文档
</h1>
<p>上一篇文章我说明了一下如何解除MaxKB用户、应用以及知识库的数量限制后来我发现它还限制了社区版查看完整API文档的能力😅这个限制给我看的那叫一个大开眼界它居然还给这个文档整了个硬编码的密码从来没见过这么搞开源的具体就是<a href="https://github.com/1Panel-dev/MaxKB/blob/f1a1c40724ceba108febb416aadb01ccb71c3add/apps/common/init/init_doc.py#L80">这一行</a>。虽然我不知道这里面提到的MD5对应的密码是多少但是既然是开源代码我把这句话删了不就行了……不过实际上不太行因为它使用了Django的国际化功能直接删掉会影响这个文件的行数程序会报错。不过可以仔细看一下关于“init_chat_doc”这一行在密码的判断后面加了个“or True”看来是MaxKB的开发者后来应老板要求放开“chat_doc”的限制但是又懒得改国际化那边的东西所以加的这个吧🤣那既然这样我直接给“init_app_doc”对应的那句话也加个“or True”不就行了加完之后打开“/doc/”路径就可以看到MaxKB的完整API文档了不需要自己手动再去抓包测试了。 </p><p>
至于其他的专业版功能我看了一下应该确实是需要用到XPACK包的不过其实关于修改页面风格的前端开源了后端在XPACK里要想用得自己实现接口开源的这部分最多只能到这里了估计是这些限制没法单独搞一个包所以他们就直接在开源代码上做限制😅看来他们老板也是没眼力啊。 </p><p>
其实与其余用MaxKB不如用<a href="https://github.com/langgenius/dify">Dify</a>至少它没有在代码里塞莫名其妙的东西来恶心人文档也相对更完备不过它目前还是相当的不成熟有很多BUG比如上传知识库显示支持Excel但是解析的时候会失败上传知识库如果通过改配置超过15M解析也会失败还有它的插件很多也是不能用比如目前阿里云的百炼会报错退回上个版本就不支持思维链的展示等等……总之不太适合生产使用。</p>
<h1 id="感想">
<a href="#感想"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 感想
</h1>
<p>现在的AI发展确实是快啊才几天时间又有一堆有意思的发展应该说现在很多公司都在趁这个机会来发布自己的产品吧感觉现在也是一个能有很多机会的时刻不过AI对研究能力的要求也是相当高的想在这个时间蹭热度也得有相当厉害的能力……像阿里的水平也是相当强的可惜营销水平不太行😆。只是像我应该也只能看着大公司的百花齐放吧看看接下来的时间还会不会出现一些有意思的东西。</p></main>
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=LLM"><em>LLM</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=AI"><em>AI</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD"><em>人工智能</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2025-03-08-llm2.md">查看原始文件</a></span></small>
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
<p id="suggest-container">Loading...</p>
<script>
var suggest = $("#suggest-container");
$.get(BlogAPI + "/suggest?id=/2025/03/08/llm2.html&update=" + lastUpdated.valueOf(), function (data) {
if (data.length) {
getSearchJSON(function (search) {
suggest.empty();
var searchMap = {};
for (var i = 0; i < search.length; i++) {
searchMap[search[i].url] = search[i];
}
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
for (var j = 0; j < data.length; j++) {
var item = searchMap[data[j].id];
if (item) {
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
var contentPreview = item.content.substring(0, 100);
if (item.content.length > 100) {
contentPreview += "……";
}
link.hover(
function(e) {
tooltip.text($(this).data('content'))
.css({
top: e.pageY + 10,
left: e.pageX + 10
})
.show();
},
function() {
tooltip.hide();
}
).mousemove(function(e) {
tooltip.css({
top: e.pageY + 10,
left: e.pageX + 10
});
}).data('content', contentPreview);
suggest.append(link);
suggest.append(' - ' + item.date + '<br />');
}
}
});
} else {
suggest.html("暂无推荐文章……");
}
});
</script>
<br />
<div class="pagination">
<span class="prev">
<a href="/2025/02/22/llm.html">
上一篇近期LLM的部署与应用经历
</a>
</span>
<br />
<span class="next">
<a href="/2025/03/22/hifi.html">
下一篇关于HiFi的尝试与探索
</a>
</span>
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/assets/css/gitalk.css">
<script src="/assets/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '/2025/03/08/llm2', // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
})
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<form id="live_talk_input_form">
<div class="live_talk_input_name_body" >
<input type="checkbox" id="load_this" />
<input type="hidden" id="post_id" value="/2025/03/08/llm2.html" />
<label for="load_this">
<span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
</label>
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</form>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden" />
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at 2026-01-01 00:00:18<br /> 总字数614622 - 文章数178 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
</p>
</footer>
</div>
<script src="/assets/js/scale.fix.js"></script>
<!--[if !IE]> -->
<script src="/assets/js/main_new.js"></script>
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>

325
2025/03/22/hifi.html Normal file
View File

@@ -0,0 +1,325 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>关于HiFi的尝试与探索 | Mayx的博客</title>
<meta name="generator" content="Jekyll v3.9.5" />
<meta property="og:title" content="关于HiFi的尝试与探索" />
<meta name="author" content="mayx" />
<meta property="og:locale" content="zh_CN" />
<meta name="description" content="如何才能听到最原始的音乐呢?" />
<meta property="og:description" content="如何才能听到最原始的音乐呢?" />
<meta property="og:site_name" content="Mayx的博客" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2025-03-22T00:00:00+08:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="关于HiFi的尝试与探索" />
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
<meta name="yandex-verification" content="fc0e535abed800be" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2025-03-22T00:00:00+08:00","datePublished":"2025-03-22T00:00:00+08:00","description":"如何才能听到最原始的音乐呢?","headline":"关于HiFi的尝试与探索","mainEntityOfPage":{"@type":"WebPage","@id":"/2025/03/22/hifi.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2025/03/22/hifi.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="canonical" href="https://mabbs.github.io/2025/03/22/hifi.html" />
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
<link rel="stylesheet" href="/assets/css/style.css?v=1767196818" />
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<!-- <![endif]-->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
<link rel="me" href="https://github.com/Mabbs" />
<script src="/assets/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var lastUpdated = new Date("Thu, 01 Jan 2026 00:00:18 +0800");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
<!--[if !IE]> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137710294-1');
</script>
<script src="/assets/js/instant.page.js" type="module"></script>
<!-- <![endif]-->
</head>
<body>
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript这不影响你的浏览但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer这不影响你的浏览但可能会有一些功能无法使用……</small></marquee><![endif]-->
<div class="wrapper">
<header class="h-card">
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
<p class="p-note">Mayx's Home Page</p>
<form action="/search.html">
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." />&#160;<input type="submit" value="搜索" />
</form>
<br />
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
<ul class="downloads">
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
</ul>
</header>
<section class="h-entry">
<small><time class="date dt-published" datetime="2025-03-22T00:00:00+08:00">22 March 2025</time> - 字数统计2347 - 阅读大约需要7分钟 - Hits: <span id="/2025/03/22/hifi.html" class="visitors">Loading...</span></small>
<h1 class="p-name">关于HiFi的尝试与探索</h1>
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
<div id="outdate" style="display:none;">
<hr /><p>
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
</p>
</div>
<script>
daysold = Math.floor((new Date().getTime() - new Date("Sat, 22 Mar 2025 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
</script>
<hr />
<b>AI摘要</b>
<p id="ai-output">这篇文章主要讲述了作者探索如何在网易云音乐上听到HiFi音乐的经历。作者通过领取VIP发现虽然默认下载的音乐不是最高音质但可以通过修改设置下载flac格式的音乐。然而下载的VIP音乐在客户端完成ncm格式加密需要通过终止下载获取flac文件。作者还提到虽然下载的音乐标注为flac但怀疑其可能是mp3转制通过查看时频谱来验证但没有原始文件进行对比。最后作者发现MacBook Pro的音响需要调整设置才能播放高采样率的音乐虽然并未达到完美的HiFi效果但对提升音乐还原度的过程感到有趣并认为追求HiFi的价值在于可以直观看到提高的过程尽管自己更倾向于成本效益高的解决方案。</p>
<hr />
<ul><li><a href="#起因">起因</a></li><li><a href="#获得音乐">获得音乐</a></li><li><a href="#分析音乐">分析音乐</a></li><li><a href="#播放音乐">播放音乐</a></li><li><a href="#感想">感想</a></li></ul>
<hr />
<main class="post-content e-content" role="main"><p>如何才能听到最原始的音乐呢?<!--more--></p>
<h1 id="起因">
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
</h1>
<p>前段时间有人在QQ群中送网易云音乐的7天体验VIP于是随手领了一份。有了VIP之后除了可以下载仅限VIP的音乐以外还可以选择更好的音质。我现在用的是<a href="/2023/02/03/mbp.html">MacBook Pro</a>据说在笔记本中音响效果是最好的那么我为了能对得起这优秀的音响也不该听垃圾音质的音乐所以就来探索一下如何听到HiFi的音乐吧。</p>
<h1 id="获得音乐">
<a href="#获得音乐"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 获得音乐
</h1>
<p>下载音乐很简单直接下一个网易云音乐客户端就可以不过需要注意要在设置中修改下载音质默认选项不是最高音质。另外它这个VIP还不是最高的再往上还有SVIP可以听所谓的“超清母带”的音质我不太清楚这个无损以上的那些音质到底是什么东西也不可能为了这点东西给网易云充钱所以我就选了个“高清臻音”的选项。 </p><p>
当我在下载一些免费歌曲的时候下载到的文件是flac格式看起来应该是没什么问题。但是下载VIP独享音乐的时候正在下载时是flac格式可是下载完就变成ncm格式了……虽然我知道有一些解密这些格式的软件GitHub上有不过好多都被DMCA takedown了虽然也能搜到<a href="https://github.com/rainlotus97/unlock-music">一些</a>……不过我还是比较好奇这个过程既然它下载时是flac那我在它刚下载完要变成ncm之前把网易云音乐强制结束掉不就可以获得完整的flac文件了嘛。试了一下还真可以也就是说这个ncm加密的过程是在客户端完成的而不是在服务器上这还真是有点离谱……我用这个方法下载了几首喜欢听的歌试了一下都能正常播放。不过用这个办法下载的音乐在客户端的下载中看不到所以就没有歌词之类的东西了。</p>
<h1 id="分析音乐">
<a href="#分析音乐"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 分析音乐
</h1>
<p>虽然说下载下来的文件是flac格式但是不代表这就是无损的音乐。毕竟从网易云音乐的“无损”以上的选项都是flac的那到底它这个无损是真无损吗首先我在网上搜了一下网易云音乐的黑历史很多有些人在网易云音乐上上传了mp3的音乐结果也有无损的选项。也就是说它这个flac很有可能是直接用mp3转换格式过来的。那这样我就不愿意了我可以接受下不到无损但是不能接受本来是mp3格式然后转成flac结果文件体积大增给我的硬盘塞一堆没用的数据所以现在我需要证明刚刚下载的音乐不是一堆没用的垃圾。 </p><p>
我看有人说可以使用<a href="https://github.com/alexkay/spek">spek</a>查看时频谱来验证如果是直接用mp3格式转换的flac文件会被整齐的砍一刀因为mp3格式支持的最大采样率是48kHz而根据香农采样定理采样频率应该大于等于模拟信号频谱中最高频率的2倍那么mp3支持的最高频率就是24kHz所以用mp3转换出来的flac一般会在24kHz那里切一刀更有甚者如果是44.1kHz采样率的mp3就会在22kHz左右的位置切一刀。不过理论上人类的听力上限就是20kHz更高的频率理论上人类应该是听不到。但毕竟我们追求的是HiFi和人类能不能听到没有关系要保证的是完整的复刻<strong>所有</strong>的信息。 </p><p>
于是我在我的Mac上用brew安装了spek安装好之后直接执行spek+音乐文件的位置就可以了我看了一下刚刚从网易云上下载的音乐全都是96kHz采样率的音乐而且没有被切过的痕迹。那这样就能证明网易云音乐就是真无损了吗其实我也不知道因为我没有从发行商直接获得的原始文件一般要对比原始文件才知道是不是无损的……不过我在网上看说无论是“高清臻音”还是“超清母带”无一例外全都是用AI升频制作的所以看时频谱已经没有意义了……但是我又没有证伪的方法那就只能先凑合听喽</p>
<h1 id="播放音乐">
<a href="#播放音乐"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 播放音乐
</h1>
<p>既然音乐已经下好了那么我直接用我的MacBook Pro播放的音乐它够HiFi吗虽然我能听出mp3中128kbps和320kbps的区别但是再高的我也听不出来……不过HiFi要的不是人能不能听出来而是它发出的声音是不是完美还原。这要怎么证明呢虽然我没有办法听出来但如果有可视化的分析至少能看出来于是我在手机上下载了一款“声音分析仪”软件它可以用FFT算法分析手机话筒收集到频谱然后展现出来。只是可视化之后……我也很难看出来它够不够HiFi啊当然理论上如果能保证播放音乐的音响和收听音乐的话筒都是最好的那么两边的频谱应该是一样的但是现实中还有底噪的存在不可能完全一样……虽然如此但我在看频谱的时候发现播放的音乐最高频率似乎只有20kHz我已经测过手机的话筒是能接收到更高的频率的既然MacBook Pro的音响是最好的怎么会只能播放20kHz的声音呢而且它这个20kHz很明显有一刀切的感觉应该是哪里配置错了。 </p><p>
于是我搜了一下Mac默认输出的声音貌似只有44100Hz的采样率需要在“音频MIDI设置”中将扬声器输出的格式改成更高的才能播放更高的频率。不过这也挺奇怪的44.1kHz的最高频率是22kHz啊为什么会在20kHz那里砍一刀呢看香农采样定理所说的是大于等于也许就是这个原因吧既然我的音乐都是96kHz采样率的音乐那么我就应该把这里的设置改成一样的。改完之后又测试了一下发现确实是突破了20kHz但好像没有超过22kHz不过至少没有“砍一刀”的痕迹了也许是音乐本身就是这样或者是扬声器最高只能到这个水平了吧。其实我也没有那么追求HiFi能到这样我已经很满意了。</p>
<h1 id="感想">
<a href="#感想"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 感想
</h1>
<p>虽然对人来说也许听HiFi并不能听出来什么但是追求HiFi还是挺有意思的毕竟提高还原程度是可以通过可视化的方式看到的既然如此那就是有追求的价值。看不见的东西是玄学可以不去追求但是HiFi是实实在在存在的这样也就能理解为什么会有人花大价钱去买各种昂贵的设备来提高还原度了因为这是真的可以起到作用的啊……当然对我来说能0成本做到尽可能的HiFi才是最重要的花钱达到HiFi就没什么必要了🤣。</p></main>
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=HiFi"><em>HiFi</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E9%9F%B3%E4%B9%90"><em>音乐</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2025-03-22-hifi.md">查看原始文件</a></span></small>
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
<p id="suggest-container">Loading...</p>
<script>
var suggest = $("#suggest-container");
$.get(BlogAPI + "/suggest?id=/2025/03/22/hifi.html&update=" + lastUpdated.valueOf(), function (data) {
if (data.length) {
getSearchJSON(function (search) {
suggest.empty();
var searchMap = {};
for (var i = 0; i < search.length; i++) {
searchMap[search[i].url] = search[i];
}
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
for (var j = 0; j < data.length; j++) {
var item = searchMap[data[j].id];
if (item) {
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
var contentPreview = item.content.substring(0, 100);
if (item.content.length > 100) {
contentPreview += "……";
}
link.hover(
function(e) {
tooltip.text($(this).data('content'))
.css({
top: e.pageY + 10,
left: e.pageX + 10
})
.show();
},
function() {
tooltip.hide();
}
).mousemove(function(e) {
tooltip.css({
top: e.pageY + 10,
left: e.pageX + 10
});
}).data('content', contentPreview);
suggest.append(link);
suggest.append(' - ' + item.date + '<br />');
}
}
});
} else {
suggest.html("暂无推荐文章……");
}
});
</script>
<br />
<div class="pagination">
<span class="prev">
<a href="/2025/03/08/llm2.html">
上一篇近期LLM的部署与应用经历(2)
</a>
</span>
<br />
<span class="next">
<a href="/2025/03/25/utm.html">
下一篇在UTM中使用苹果虚拟化的各种尝试
</a>
</span>
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/assets/css/gitalk.css">
<script src="/assets/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '/2025/03/22/hifi', // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
})
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<form id="live_talk_input_form">
<div class="live_talk_input_name_body" >
<input type="checkbox" id="load_this" />
<input type="hidden" id="post_id" value="/2025/03/22/hifi.html" />
<label for="load_this">
<span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
</label>
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</form>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden" />
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at 2026-01-01 00:00:18<br /> 总字数614622 - 文章数178 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
</p>
</footer>
</div>
<script src="/assets/js/scale.fix.js"></script>
<!--[if !IE]> -->
<script src="/assets/js/main_new.js"></script>
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>

330
2025/03/25/utm.html Normal file
View File

@@ -0,0 +1,330 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>在UTM中使用苹果虚拟化的各种尝试 | Mayx的博客</title>
<meta name="generator" content="Jekyll v3.9.5" />
<meta property="og:title" content="在UTM中使用苹果虚拟化的各种尝试" />
<meta name="author" content="mayx" />
<meta property="og:locale" content="zh_CN" />
<meta name="description" content="用官方的方式做非官方的事!" />
<meta property="og:description" content="用官方的方式做非官方的事!" />
<meta property="og:site_name" content="Mayx的博客" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2025-03-25T00:00:00+08:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="在UTM中使用苹果虚拟化的各种尝试" />
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
<meta name="yandex-verification" content="fc0e535abed800be" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2025-03-25T00:00:00+08:00","datePublished":"2025-03-25T00:00:00+08:00","description":"用官方的方式做非官方的事!","headline":"在UTM中使用苹果虚拟化的各种尝试","mainEntityOfPage":{"@type":"WebPage","@id":"/2025/03/25/utm.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2025/03/25/utm.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="canonical" href="https://mabbs.github.io/2025/03/25/utm.html" />
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
<link rel="stylesheet" href="/assets/css/style.css?v=1767196818" />
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<!-- <![endif]-->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
<link rel="me" href="https://github.com/Mabbs" />
<script src="/assets/js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var lastUpdated = new Date("Thu, 01 Jan 2026 00:00:18 +0800");
var BlogAPI = "https://summary.mayx.eu.org";
</script>
<script src="/assets/js/main.js"></script>
<!--[if !IE]> -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137710294-1');
</script>
<script src="/assets/js/instant.page.js" type="module"></script>
<!-- <![endif]-->
</head>
<body>
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript这不影响你的浏览但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer这不影响你的浏览但可能会有一些功能无法使用……</small></marquee><![endif]-->
<div class="wrapper">
<header class="h-card">
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
<p class="p-note">Mayx's Home Page</p>
<form action="/search.html">
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." />&#160;<input type="submit" value="搜索" />
</form>
<br />
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
<ul class="downloads">
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
</ul>
</header>
<section class="h-entry">
<small><time class="date dt-published" datetime="2025-03-25T00:00:00+08:00">25 March 2025</time> - 字数统计2781 - 阅读大约需要9分钟 - Hits: <span id="/2025/03/25/utm.html" class="visitors">Loading...</span></small>
<h1 class="p-name">在UTM中使用苹果虚拟化的各种尝试</h1>
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
<div id="outdate" style="display:none;">
<hr /><p>
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
</p>
</div>
<script>
daysold = Math.floor((new Date().getTime() - new Date("Tue, 25 Mar 2025 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
</script>
<hr />
<b>AI摘要</b>
<p id="ai-output">这篇文章讲述了作者在苹果设备的UTM虚拟机环境中尝试使用苹果虚拟化框架进行非传统操作即通过UTM的Virtio GPU和Virtualization.frameworkVZ安装Windows系统。作者首先复制了一个已有的VZUbuntu虚拟机然后尝试使用重装脚本来转换为Windows但遇到黑屏问题。通过安装Windows驱动和调整显示器设置作者成功让Windows在虚拟机中运行且发现VZ在性能上优于HVF。文章最后提到虽然在macOS 12中使用VZ安装Linux存在一些挑战如不支持UEFI和需要手动准备内核但作者仍然成功进行了实验认为苹果的虚拟化技术潜力未被充分利用。作者也指出这些非官方方法可能随着macOS更新而变得不稳定。</p>
<hr />
<ul><li><a href="#起因">起因</a></li><li><a href="#在utm中使用苹果虚拟化框架安装windows">在UTM中使用苹果虚拟化框架安装Windows</a></li><li><a href="#在macos-12中的utm使用苹果虚拟化框架安装linux">在macOS 12中的UTM使用苹果虚拟化框架安装Linux</a></li><li><a href="#感想">感想</a></li></ul>
<hr />
<main class="post-content e-content" role="main"><p>用官方的方式做非官方的事!<!--more--></p>
<h1 id="起因">
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
</h1>
<p>在几年前刚<a href="/2023/02/03/mbp.html">收到MacBook Pro</a>的时候,我曾安装过虚拟机软件<a href="https://github.com/utmapp/UTM">UTM</a>。但是因为我的Mac内存很小用虚拟机的体验很差所以就把UTM卸载掉了。不过以前还我还<a href="/2024/06/16/hackintosh.html">装过一台黑苹果</a>在上面也安装了UTM。 </p><p>
最近正好由于某些原因我需要在macOS上安装虚拟机既然有UTM用就继续用UTM了。当然正常情况就是按正常的方式安装系统然后正常的用这并没有什么意思。所以我想整点有意思的事情想试试不太正常的使用UTM😝。</p>
<h1 id="在utm中使用苹果虚拟化框架安装windows">
<a href="#在utm中使用苹果虚拟化框架安装windows"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 在UTM中使用苹果虚拟化框架安装Windows
</h1>
<p>如果用过UTM的话应该知道UTM有很多选项比如底层的虚拟化框架可以用QEMU或者<a href="https://developer.apple.com/documentation/Virtualization">Virtualization.framework</a>VZ而QEMU的后端可以选TCG或者是<a href="https://developer.apple.com/documentation/hypervisor">Hypervisor.framework</a>HVF。它们有很多特色像TCG的兼容性最好可以模拟任何架构的CPU但是性能最差HVF使用硬件虚拟化加速只能运行宿主机架构的程序但是性能比较好而VZ经过了苹果官方优化性能最好。 </p><p>
那么现在我想安装Windows又想有最好的性能那我应该选择VZ吧可是UTM不允许我这样选择如果选择安装Windows就会强制使用QEMU……只有Linux或者macOS在ARM处理器才能使用VZ……那我应该如何绕过这个限制呢 </p><p>
我想起来之前<a href="/2024/11/02/trojan.html">让没用的主机感染木马</a>的文章中使用了<a href="https://github.com/bin456789/reinstall">一键DD/重装脚本</a>把我服务器的Linux系统重装成了Windows系统那么我能不能用相同的方式先按照正常的方式用VZ安装一个Linux系统然后使用这个脚本重装成Windows我觉得理论上应该没问题所以就尝试了一下。 </p><p>
我在这之前已经安装过了一个用了VZ的Ubuntu虚拟机新建比较费时间所以就直接把这个虚拟机复制了一份。然后下载了重装脚本准备重装系统但是看说明现在不能让脚本自己查找系统镜像安装了不过没关系前段时间我下了一份Windows 10的镜像接下来我只需要在镜像所在目录执行</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>python3 <span class="nt">-m</span> http.server
</code></pre></div></div>
<p>开启一个文件服务器,然后在虚拟机中执行</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bash reinstall.sh windows <span class="nt">--image-name</span> <span class="s2">"Windows 10 Pro"</span> <span class="nt">--iso</span> <span class="s2">"http://192.168.64.1:8000/windows.iso"</span>
</code></pre></div></div>
<p>就可以了执行后重启就可以在UTM的虚拟机界面中看到脚本执行的一系列操作。在这期间都很顺利然而在它执行完之后虚拟机的屏幕就黑了而且重启也没有任何变化看来是实验失败了不过也可能是因为苹果整的虚拟显示器在Windows中识别不出来所以显示不出东西因为我看活动监视器中CPU的占用率也在跳变虚拟机应该仍然在运行于是我下载了<a href="https://apps.apple.com/us/app/windows-app/id1295203466">Windows App</a>以前的远程桌面使用虚拟机之前的IP进行连接结果连接成功了😆。看来苹果的虚拟化框架是能运行Windows的嘛居然没有一个人尝试一下。 </p><p>
不过屏幕不能亮是真的没有驱动吗我看了眼设备管理器搜了一下那个没有安装驱动的视频控制器的设备ID“1af4:1050”好像是Virtio GPU这个驱动我记得在<a href="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/">virtio-win</a>里是有的而且重装脚本也会自动下载这个驱动为什么会没有自动安装呢可能是设备ID和驱动不一致吧……不过不影响我选择更新驱动在列表中选择“Red Hat VirtIO GPU DOD controller”之后UTM的虚拟屏幕中就可以看到画面了虽然分辨率只能是1024*768……不过能用就很不错了。 </p><p>
再接下来我就需要验证一下它的性能是不是最好的我把这个虚拟机的硬盘复制了一份新建了一个使用HVF后端的QEMU虚拟机把这个硬盘挂载上然后使用国际象棋跑分看了一下VZ的跑分相比HVF的跑分高了大概5%-10%,还是挺厉害的。 </p><p>
至于其他方面我看了一眼用HVF的QEMU虚拟机CPU不能显示正确的型号而VZ是可以的另外VZ的SMBIOS信息中也可以看到Apple的字样证明这个Windows确确实实是跑在了苹果的虚拟化框架。不过以上的测试都是基于x86架构的macOS等回头我的Mac Studio到了之后再在ARM架构的macOS上再测一下看看能不能用相同的方式安装如果可以的话说明VZ的虚拟机没什么兼容性的问题UTM应该放开使用VZ安装Windows的选项让我们测测苹果的技术才对。</p>
<h1 id="在macos-12中的utm使用苹果虚拟化框架安装linux">
<a href="#在macos-12中的utm使用苹果虚拟化框架安装linux"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 在macOS 12中的UTM使用苹果虚拟化框架安装Linux
</h1>
<p>虽然在刚刚的测试中用VZ安装Linux就和其他普通的虚拟机安装Linux一样简单但是之前的测试是在macOS 15上测的。现在我遇到了一个新问题我现在有一台2016年的Mac上面运行着macOS 12而且不能用OCLP升级到macOS 15因为不是我的电脑。现在我想在这台电脑上用苹果虚拟化框架安装Linux虽然用QEMU更简单但是感觉没意思。在macOS 12中不支持UEFI bootloader所以我需要手工准备内核镜像之类的东西。 </p><p>
当然从零开始有点难我打算先用QEMU安装一遍Ubuntu Server。在创建虚拟机之后需要注意要把刚创建好的虚拟机的硬盘删掉因为那是qcow2格式的在VZ中只支持img格式的硬盘所以删掉之后需要创建一个“RAW映像”然后按照正常的方式安装系统。 </p><p>
安装好之后从“/boot”目录中把“vmlinuz”和“initrd.img”复制出来作为Linux内核和初始Ramdisk我看说明上要未经压缩的Linux内核映像但是好像是压缩的也能用🤔。随后关机把在QEMU中的硬盘映像复制出来作为根文件系统映像。 </p><p>
至于启动参数,可以看“/boot/grub/grub.cfg”中内核后面跟的那串然后再加上“console=hvc0”因为macOS 12中使用VZ没有虚拟屏幕只能用虚拟串口连接。在一切准备好之后就可以开机了在一串内核信息不停滚动后显示出了登录的提示符实验就成功结束了。 </p><p>
不过这样启动的话在系统中所有对内核以及对initramfs的更新就全都不会生效了毕竟虚拟机根本读不到内核了……这倒是影响不大反正不更新也不是不能用更何况macOS都不打算更新虚拟机不更新又能怎样呢🤣。</p>
<h1 id="感想">
<a href="#感想"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 感想
</h1>
<p>看来苹果的“不支持”不代表真的不支持想想既然是虚拟机当然就不应该限制系统类型啊毕竟虚拟机虚拟的是硬件又不是软件。不过倒是也能理解苹果不需要声明支持自己的竞品所以也没必要做相应的兼容和测试但居然没见到有人尝试一下也挺奇怪明明用Mac的人也有不少对技术很有探索精神的人啊…… </p><p>
不过随着macOS的更新像这些非官方支持的办法估计也很有可能出问题毕竟苹果并不对这些情况进行任何形式的保障也许以后苹果的哪次更新这个方法就用不了了呢……</p></main>
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=%E8%99%9A%E6%8B%9F%E5%8C%96"><em>虚拟化</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E8%8B%B9%E6%9E%9C"><em>苹果</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=UTM"><em>UTM</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2025-03-25-utm.md">查看原始文件</a></span></small>
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
<p id="suggest-container">Loading...</p>
<script>
var suggest = $("#suggest-container");
$.get(BlogAPI + "/suggest?id=/2025/03/25/utm.html&update=" + lastUpdated.valueOf(), function (data) {
if (data.length) {
getSearchJSON(function (search) {
suggest.empty();
var searchMap = {};
for (var i = 0; i < search.length; i++) {
searchMap[search[i].url] = search[i];
}
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
for (var j = 0; j < data.length; j++) {
var item = searchMap[data[j].id];
if (item) {
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
var contentPreview = item.content.substring(0, 100);
if (item.content.length > 100) {
contentPreview += "……";
}
link.hover(
function(e) {
tooltip.text($(this).data('content'))
.css({
top: e.pageY + 10,
left: e.pageX + 10
})
.show();
},
function() {
tooltip.hide();
}
).mousemove(function(e) {
tooltip.css({
top: e.pageY + 10,
left: e.pageX + 10
});
}).data('content', contentPreview);
suggest.append(link);
suggest.append(' - ' + item.date + '<br />');
}
}
});
} else {
suggest.html("暂无推荐文章……");
}
});
</script>
<br />
<div class="pagination">
<span class="prev">
<a href="/2025/03/22/hifi.html">
上一篇关于HiFi的尝试与探索
</a>
</span>
<br />
<span class="next">
<a href="/2025/04/04/search.html">
下一篇:最近对博客搜索功能的优化记录
</a>
</span>
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/assets/css/gitalk.css">
<script src="/assets/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '/2025/03/25/utm', // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
})
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<form id="live_talk_input_form">
<div class="live_talk_input_name_body" >
<input type="checkbox" id="load_this" />
<input type="hidden" id="post_id" value="/2025/03/25/utm.html" />
<label for="load_this">
<span style="font-size: 11px; color: #fff;">&#160;想问这篇文章</span>
</label>
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</form>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden" />
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at 2026-01-01 00:00:18<br /> 总字数614622 - 文章数178 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
</p>
</footer>
</div>
<script src="/assets/js/scale.fix.js"></script>
<!--[if !IE]> -->
<script src="/assets/js/main_new.js"></script>
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>