Downloads · 30 days
414
3% of all-time downloads
giladgd/gpt-oss-20b-GGUF
gpt-oss-20b-GGUF is a text generation model from giladgd. Use it when you need the model to write or continue text. It is set up for node-llama-cpp. The card lists the license as apache-2.0.
[!NOTE] Read our guide on using gpt-oss to learn how to adjust its responses
Downloads · 30 days
414
3% of all-time downloads
All-time downloads
14.9K
Public
Repo size
25.9 GB
Likes
2
Public
Click a slice to open those files.
.gguf25.9 GB · 100%
From the Hugging Face model README
<p align="center"> <img alt="gpt-oss-20b" src="https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-20b.svg"> </p>[!NOTE] Read our guide on using
gpt-ossto learn how to adjust its responses
gpt-oss-120b run on a single 80GB GPU (like NVIDIA H100 or AMD MI300X) and the gpt-oss-20b model run within 16GB of memory.[!NOTE] Refer to the original model card for more details on the model
| Link | URI | Size |
|---|---|---|
| GGUF | hf:giladgd/gpt-oss-20b-GGUF/gpt-oss-20b.MXFP4.gguf | 12.1GB |
| GGUF | hf:giladgd/gpt-oss-20b-GGUF/gpt-oss-20b.F16.gguf | 13.8GB |
[!TIP] Download a quant using
node-llama-cpp(more info):npx -y node-llama-cpp pull <URI>
node-llama-cpp (recommended)Chat with the model:
npx -y node-llama-cpp chat hf:giladgd/gpt-oss-20b-GGUF/gpt-oss-20b.MXFP4.gguf
[!NOTE] Ensure that you have
node.jsinstalled first:brew install nodejs
Use it in your node.js project:
npm install node-llama-cpp
import {getLlama, resolveModelFile, LlamaChatSession} from "node-llama-cpp";
const modelUri = "hf:giladgd/gpt-oss-20b-GGUF/gpt-oss-20b.MXFP4.gguf";
const llama = await getLlama();
const model = await llama.loadModel({
modelPath: await resolveModelFile(modelUri)
});
const context = await model.createContext();
const session = new LlamaChatSession({
contextSequence: context.getSequence()
});
const q1 = "Hi there, how are you?";
console.log("User: " + q1);
const a1 = await session.prompt(q1);
console.log("AI: " + a1);
[!TIP] Read the getting started guide to quickly scaffold a new
node-llama-cppproject
Set Harmoy options using HarmonyChatWrapper:
import {
getLlama, resolveModelFile, LlamaChatSession, HarmonyChatWrapper,
defineChatSessionFunction
} from "node-llama-cpp";
const modelUri = "hf:giladgd/gpt-oss-20b-GGUF/gpt-oss-20b.MXFP4.gguf";
const llama = await getLlama();
const model = await llama.loadModel({
modelPath: await resolveModelFile(modelUri)
});
const context = await model.createContext();
const session = new LlamaChatSession({
contextSequence: context.getSequence(),
chatWrapper: new HarmonyChatWrapper({
modelIdentity: "You are ChatGPT, a large language model trained by OpenAI.",
reasoningEffort: "high"
})
});
const functions = {
getCurrentWeather: defineChatSessionFunction({
description: "Gets the current weather in the provided location.",
params: {
type: "object",
properties: {
location: {
type: "string",
description: "The city and state, e.g. San Francisco, CA"
},
format: {
enum: ["celsius", "fahrenheit"]
}
}
},
handler({location, format}) {
console.log(`Getting current weather for "${location}" in ${format}`);
return {
// simulate a weather API response
temperature: format === "celsius" ? 20 : 68,
format
};
}
})
};
const q1 = "What is the weather like in SF?";
console.log("User: " + q1);
const a1 = await session.prompt(q1, {functions});
console.log("AI: " + a1);
Install llama.cpp through brew (works on Mac and Linux)
brew install llama.cpp
llama-cli --hf-repo giladgd/gpt-oss-20b-GGUF --hf-file gpt-oss-20b.MXFP4.gguf -p "The meaning to life and the universe is"
llama-server --hf-repo giladgd/gpt-oss-20b-GGUF --hf-file gpt-oss-20b.MXFP4.gguf -c 2048