Instructions to use bartowski/reader-lm-1.5b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bartowski/reader-lm-1.5b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bartowski/reader-lm-1.5b-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bartowski/reader-lm-1.5b-GGUF", dtype="auto") - llama-cpp-python
How to use bartowski/reader-lm-1.5b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="bartowski/reader-lm-1.5b-GGUF", filename="reader-lm-1.5b-IQ3_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use bartowski/reader-lm-1.5b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf bartowski/reader-lm-1.5b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf bartowski/reader-lm-1.5b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf bartowski/reader-lm-1.5b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf bartowski/reader-lm-1.5b-GGUF:Q4_K_M
Use pre-built binary
# 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 bartowski/reader-lm-1.5b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bartowski/reader-lm-1.5b-GGUF:Q4_K_M
Build from source code
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 bartowski/reader-lm-1.5b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bartowski/reader-lm-1.5b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/bartowski/reader-lm-1.5b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use bartowski/reader-lm-1.5b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bartowski/reader-lm-1.5b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/reader-lm-1.5b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bartowski/reader-lm-1.5b-GGUF:Q4_K_M
- SGLang
How to use bartowski/reader-lm-1.5b-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bartowski/reader-lm-1.5b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/reader-lm-1.5b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bartowski/reader-lm-1.5b-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/reader-lm-1.5b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use bartowski/reader-lm-1.5b-GGUF with Ollama:
ollama run hf.co/bartowski/reader-lm-1.5b-GGUF:Q4_K_M
- Unsloth Studio new
How to use bartowski/reader-lm-1.5b-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for bartowski/reader-lm-1.5b-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for bartowski/reader-lm-1.5b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for bartowski/reader-lm-1.5b-GGUF to start chatting
- Docker Model Runner
How to use bartowski/reader-lm-1.5b-GGUF with Docker Model Runner:
docker model run hf.co/bartowski/reader-lm-1.5b-GGUF:Q4_K_M
- Lemonade
How to use bartowski/reader-lm-1.5b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bartowski/reader-lm-1.5b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.reader-lm-1.5b-GGUF-Q4_K_M
List all available models
lemonade list
vllm: ....does not appear to have a file named config.json
Hi,
since vLLM still requires GGUF models to have a config.json, is there the possibility to create one?
Thank you in advance
Best regards
Hi @bartowski ,
thanks for your quick response!
With the config.json I get the following error:
File "/usr/lib64/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/ray/serve/_private/replica.py", line 631, in initialize_and_get_metadata
raise RuntimeError(traceback.format_exc()) from None
RuntimeError: Traceback (most recent call last):
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/ray/serve/_private/replica.py", line 609, in initialize_and_get_metadata
await self._user_callable_wrapper.initialize_callable()
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/ray/serve/_private/replica.py", line 901, in initialize_callable
await self._call_func_or_gen(
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/ray/serve/_private/replica.py", line 867, in _call_func_or_gen
result = callable(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/ray/serve/api.py", line 219, in __init__
cls.__init__(self, *args, **kwargs)
File "/u01/app/mlo/projects/llm-apis/ray_vllm_inference/vllm_serve.py", line 105, in __init__
self.engine = AsyncLLMEngine.from_engine_args(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/vllm/engine/async_llm_engine.py", line 726, in from_engine_args
engine_config = engine_args.create_engine_config()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/vllm/engine/arg_utils.py", line 792, in create_engine_config
model_config = ModelConfig(
^^^^^^^^^^^^
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/vllm/config.py", line 230, in __init__
self.multimodal_config = self._init_multimodal_config(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/runtime_resources/pip/abc/venv/lib64/python3.11/site-packages/vllm/config.py", line 245, in _init_multimodal_config
if any(
^
TypeError: 'NoneType' object is not iterable
But, I'll try to link the model and tokenizer to vllm like they explained here
https://github.com/vllm-project/vllm/issues/8401