Downloads · 30 days
11
13% of all-time downloads
AXERA-TECH/Gemma-3-1B-it-AX650
Gemma-3-1B-it-AX650 is a machine learning model from AXERA-TECH. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
11
13% of all-time downloads
All-time downloads
82
Public
Repo size
3.4 GB
Likes
0
Public
Click a slice to open those files.
.axmodel1.6 GB · 73%
From the Hugging Face model README
方式一:克隆仓库后执行安装脚本:
git clone -b axllm https://github.com/AXERA-TECH/ax-llm.git
cd ax-llm
./install.sh
方式二:一行命令安装(默认分支 axllm):
curl -fsSL https://raw.githubusercontent.com/AXERA-TECH/ax-llm/axllm/install.sh | bash
如果没有编译环境,请到:
https://github.com/AXERA-TECH/ax-llm/actions?query=branch%3Aaxllm
下载 最新 CI 导出的可执行程序(axllm),然后:
chmod +x axllm
sudo mv axllm /usr/bin/axllm
先创建模型目录并进入,然后下载到该目录:
mkdir -p AXERA-TECH/Gemma-3-1B-it-AX650
cd AXERA-TECH/Gemma-3-1B-it-AX650
hf download AXERA-TECH/Gemma-3-1B-it-AX650 --local-dir .
axllm run AXERA-TECH/Gemma-3-1B-it-AX650
axllm serve AXERA-TECH/Gemma-3-1B-it-AX650
from openai import OpenAI
API_URL = "http://127.0.0.1:8000/v1"
MODEL = "AXERA-TECH/Gemma-3-1B-it"
messages = [
{"role": "system", "content": [{"type": "text", "text": "you are a helpful assistant."}]},
{"role": "user", "content": "hello"},
]
client = OpenAI(api_key="not-needed", base_url=API_URL)
completion = client.chat.completions.create(
model=MODEL,
messages=messages,
)
print(completion.choices[0].message.content)
from openai import OpenAI
API_URL = "http://127.0.0.1:8000/v1"
MODEL = "AXERA-TECH/Gemma-3-1B-it"
messages = [
{"role": "system", "content": [{"type": "text", "text": "you are a helpful assistant."}]},
{"role": "user", "content": "hello"},
]
client = OpenAI(api_key="not-needed", base_url=API_URL)
stream = client.chat.completions.create(
model=MODEL,
messages=messages,
stream=True,
)
print("assistant:")
for ev in stream:
delta = getattr(ev.choices[0], "delta", None)
if delta and getattr(delta, "content", None):
print(delta.content, end="", flush=True)
print("
")