Instructions to use clibrain/lince-zero with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use clibrain/lince-zero with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="clibrain/lince-zero", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("clibrain/lince-zero", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("clibrain/lince-zero", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use clibrain/lince-zero with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "clibrain/lince-zero" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "clibrain/lince-zero", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/clibrain/lince-zero
- SGLang
How to use clibrain/lince-zero 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 "clibrain/lince-zero" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "clibrain/lince-zero", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "clibrain/lince-zero" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "clibrain/lince-zero", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use clibrain/lince-zero with Docker Model Runner:
docker model run hf.co/clibrain/lince-zero
configuration_RW.py not found
I launch:
python lincezero.py (with code of Use the code below to get started with LINCE-ZERO!)
And get the error:
Could not locate the configuration_RW.py inside tiiuae/falcon-7b.
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 261, in hf_raise_for_status
response.raise_for_status()
File "/opt/conda/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/tiiuae/falcon-7b/resolve/main/configuration_RW.py
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py", line 429, in cached_file
resolved_file = hf_hub_download(
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1232, in hf_hub_download
metadata = get_hf_file_metadata(
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1608, in get_hf_file_metadata
hf_raise_for_status(r)
File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 271, in hf_raise_for_status
raise EntryNotFoundError(message, response) from e
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-6532c37c-186a727c296ce5506886368a;8839822b-3192-44ef-9a60-9dfe8e79d1fa)
Entry Not Found for url: https://huggingface.co/tiiuae/falcon-7b/resolve/main/configuration_RW.py.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/workspace/lincezero.py", line 8, in
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True).to("cuda")
File "/opt/conda/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 525, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
File "/opt/conda/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1043, in from_pretrained
config_class = get_class_from_dynamic_module(
File "/opt/conda/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 485, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/opt/conda/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 292, in get_cached_module_file
resolved_module_file = cached_file(
File "/opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py", line 480, in cached_file
raise EnvironmentError(
OSError: tiiuae/falcon-7b does not appear to have a file named configuration_RW.py. Checkout 'https://huggingface.co/tiiuae/falcon-7b/main' for available files.
same here...