Tag Archives: ubuntu

在 Ubuntu 2204 上运行 LLaMA.cpp

最近 ChatGPT 着实火了一把,据说 GTP4 也即将发布。现在Large Language Model(LLM )也受到了类似图像生成的 Stable Diffusion 那种高光时刻。

在之前我一直有一个错误的观念,认为谁掌握着计算能力,谁才能得到最好的AI模型。直到 Facebook 2023 年二月 24 号发布了论文“LLaMA: Open and Efficient Foundation Language Models”。粗略阅读之后,我才知道原来在一个限定的预算下,大参数模型并不如小参数模型用更多的数据进行训练。

当前,许多 AI 模型都依赖 CUDA,比如 nanoGPT,这也就意味着必须有 NVIDIA 的 GPU来训练和运行。有这样的硬件限制,对于我这种只是想初步了解一下 LLMs 的一些基本概念的业余爱好者变成了一个比较高的门槛。

所幸的是 Georgi Gerganov 用 C/C++ 基于 LLaMA 实现了一个跑在 CPU 上的移植版本 llama.cpp。llama.cpp 甚至将 Apple silicon 作为一等公民对待,这也意味着苹果 silicon 可以顺利运行这个语言模型。

Continue reading 在 Ubuntu 2204 上运行 LLaMA.cpp

Temporary solution for Ubuntu’s “not have a Release file”


It’s wired that when I tried to update the Ubuntu zesty and install some new packages today, I got such errors below.

Err:8 http://security.ubuntu.com/ubuntu zesty-security Release      
  404  Not Found [IP: 91.189.88.161 80]
Err:10 http://archive.ubuntu.com/ubuntu zesty Release
  404  Not Found [IP: 91.189.88.152 80]
Err:12 http://archive.ubuntu.com/ubuntu zesty-updates Release
  404  Not Found [IP: 91.189.88.152 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu zesty Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

And none of the other mirrors works to me. All of them has the same issue “no longer have a Release file”. I did some research and found the error message actually has another form “not have a Release file”.

The solution is easy but tricky — Disable all sources of `security.ubuntu.com` and replace `archive.ubuntu.com` to `old-releases.ubuntu.com`.

Continue reading Temporary solution for Ubuntu’s “not have a Release file”

PHP-YAF 的 PPA 源

PHP-YAFlaruence 开发的类似 Zend Freamwork 的 PHP 扩展框架。轻巧、快速,扩展性良好。并且可以与 PEAR、Zend Freamwork 这些库协调工作,兼容良好。因此,这一年多,我基本上已经放弃 ZF 为主体的集成框架(还记得 Ninny Project 吗?),并将其移植到了 YAF 上。

虽然,作为 PHP 开发者,laruence 一早就对 YAF 进行了 PECL 的支持,使用 PECL 安装 YAF 也很方便。但是作为一个重度 apt 依赖患者,还是希望能够使用源方式维护安装包。

因此,这个 PHP-YAF 的 PPA 源诞生了!

由于完全不会用 bzr,因此没有用 launchpad 的服务,我将打包程序和相关配置放在了 github 上。

Continue reading PHP-YAF 的 PPA 源

firefox 5.0 安装 Google Toolbar 的办法

Ubuntu 一向都很高效,firefox 5 出来没几天就将 11.04 的浏览器升级到了版本 5。于是,有点小杯具了。其他不兼容差价都是平常不怎么用的,不用也罢。结果 google toolbar 居然不兼容。上个邮箱、书签,搜个资料,一直都用的是这个。于是,过了数天没有 google toolbar 的日子……

忍不下去了!!!

上网搜了一下,找到一个不错的firefox add-ons:Add-on Compatibility Reporter

用法简单,直接安装重启 firefox 即可,无须设置。

Bingo!

在 Ubuntu 9.10 下安装和简单配置 trac 0.12dev

昨日(2010-03-14)在金山参加了”CPyUG会课总第38期~暨珠三角技术沙龙第6次“。会中廖杰大仙用平和的语气,激动人心的介绍了 trac 若干功能、以及插件的开发和金山已经在使用的或者准备使用的插件。回来手痒,随尝试安装 0.12dev。

关于 Windows 下的安装,请看赖神的《在 windows 下安装和简单配置 trac 0.12》。

Ubuntu 下没 Windows 下麻烦,不过如果完全按照 Trac 官方的文档,还是会略有折腾,特别记录于此,以备后用。 Continue reading 在 Ubuntu 9.10 下安装和简单配置 trac 0.12dev

在 Ubuntu 9.10 Server 上安装 Nginx 0.8.34

Nginx 在 3 月 3 日放出了 0.8.34 这个开发版。张宴也随即更新了《Nginx 0.8.x + PHP 5.2.13(FastCGI)搭建胜过Apache十倍的Web服务器》到第六版。不过,他写的记录是针对 CentOS、Redhat 等 rpm 包管理的服务器。由于习惯了 debian 系列的服务器,特别是用惯了 ubuntu 服务器,在这里特别做一下 Ubuntu 9.10 下的安装笔记。其他基于 deb 包管理的发行版也类似。 Continue reading 在 Ubuntu 9.10 Server 上安装 Nginx 0.8.34

Ubuntu升级内核到2.6.28-14后VritualBox不能启动的问题

国内镜像源不知道是不是都有问题,几天前就提示可以升级,但总也找不到linux-image-2.6.28-14-generic这个的依赖包(404错误)。索性换到了主站上更新。

一切顺利,速度也不差……

然后麻烦来了,VritualBox3.0.2无法启动。提示:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing

‘/etc/init.d/vboxdrv setup’

折腾了半天,最后发现解决办法爆简单:

sudo apt-get install linux-headers-2.6.28-14-generic

然后

sudo /etc/init.d/vboxdrv setup

就可以了。