HuggingFaceTB/cosmopedia
Viewer • Updated • 31.1M • 19.4k • 740
How to use BasedBots/cosmo-1b-Q8_0-GGUF with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
docker model run hf.co/BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
How to use BasedBots/cosmo-1b-Q8_0-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "BasedBots/cosmo-1b-Q8_0-GGUF"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "BasedBots/cosmo-1b-Q8_0-GGUF",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
How to use BasedBots/cosmo-1b-Q8_0-GGUF with Ollama:
ollama run hf.co/BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
How to use BasedBots/cosmo-1b-Q8_0-GGUF with Docker Model Runner:
docker model run hf.co/BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
How to use BasedBots/cosmo-1b-Q8_0-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0
lemonade run user.cosmo-1b-Q8_0-GGUF-Q8_0
lemonade list
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0# Run inference directly in the terminal:
llama cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0# Run inference directly in the terminal:
./llama-cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0# Run inference directly in the terminal:
./build/bin/llama-cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0docker model run hf.co/BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0This model was converted to GGUF format from HuggingFaceTB/cosmo-1b using llama.cpp.
Refer to the original model card for more details on the model.
Install llama.cpp through brew.
brew install ggerganov/ggerganov/llama.cpp
Invoke the llama.cpp server or the CLI.
CLI:
llama-cli --hf-repo BasedBots/cosmo-1b-Q8_0-GGUF --model cosmo-1b.Q8_0.gguf -p "The meaning to life and the universe is"
Server:
llama-server --hf-repo BasedBots/cosmo-1b-Q8_0-GGUF --model cosmo-1b.Q8_0.gguf -c 2048
Note: You can also use this checkpoint directly through the usage steps listed in the Llama.cpp repo as well.
git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make && ./main -m cosmo-1b.Q8_0.gguf -n 128
8-bit
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0# Run inference directly in the terminal: llama cli -hf BasedBots/cosmo-1b-Q8_0-GGUF:Q8_0