Instructions to use gizmo-ai/q-and-a-llama-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gizmo-ai/q-and-a-llama-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gizmo-ai/q-and-a-llama-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gizmo-ai/q-and-a-llama-7b") model = AutoModelForCausalLM.from_pretrained("gizmo-ai/q-and-a-llama-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gizmo-ai/q-and-a-llama-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gizmo-ai/q-and-a-llama-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gizmo-ai/q-and-a-llama-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gizmo-ai/q-and-a-llama-7b
- SGLang
How to use gizmo-ai/q-and-a-llama-7b 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 "gizmo-ai/q-and-a-llama-7b" \ --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": "gizmo-ai/q-and-a-llama-7b", "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 "gizmo-ai/q-and-a-llama-7b" \ --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": "gizmo-ai/q-and-a-llama-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gizmo-ai/q-and-a-llama-7b with Docker Model Runner:
docker model run hf.co/gizmo-ai/q-and-a-llama-7b
| { | |
| "00HNi": 32030, | |
| "1FmOs": 32063, | |
| "1TTmX": 32056, | |
| "2OFwk": 32017, | |
| "3gFFl": 32006, | |
| "4cWYa": 32025, | |
| "512SE": 32037, | |
| "6TEmp": 32029, | |
| "6Z3cA": 32058, | |
| "7B98e": 32032, | |
| "7FKNY": 32055, | |
| "7MX5D": 32041, | |
| "7cTzx": 32050, | |
| "7yIul": 32044, | |
| "9gpHj": 32062, | |
| "<pad>": 32000, | |
| "A9W8A": 32004, | |
| "AnyaG": 32027, | |
| "ArMS6": 32024, | |
| "BVVYb": 32022, | |
| "BYkLX": 32007, | |
| "CAb0h": 32036, | |
| "FY8lJ": 32023, | |
| "GdmSQ": 32057, | |
| "HGSPd": 32053, | |
| "IILY4": 32028, | |
| "Jgzxo": 32013, | |
| "LvpB9": 32001, | |
| "PJkgm": 32061, | |
| "RPNy4": 32042, | |
| "WC7VY": 32015, | |
| "WMYep": 32026, | |
| "WlzVg": 32040, | |
| "XCP8H": 32012, | |
| "aQHE4": 32045, | |
| "aUUPw": 32034, | |
| "asQUn": 32035, | |
| "coiht": 32014, | |
| "dFNK3": 32031, | |
| "ezXfx": 32049, | |
| "gH6A2": 32016, | |
| "gfsJC": 32011, | |
| "hpWHi": 32005, | |
| "iKRnq": 32052, | |
| "jS3GU": 32051, | |
| "lmsvx": 32054, | |
| "mltdB": 32009, | |
| "muEXS": 32060, | |
| "mxbPs": 32002, | |
| "oc6xI": 32018, | |
| "olCZ3": 32046, | |
| "q0tfs": 32019, | |
| "qAaHh": 32038, | |
| "rufLv": 32033, | |
| "smHJB": 32048, | |
| "tUt8h": 32047, | |
| "uot8J": 32020, | |
| "uqsLo": 32008, | |
| "wwFcY": 32010, | |
| "yN6Pr": 32059, | |
| "yWs8K": 32039, | |
| "yj8GI": 32021, | |
| "zD3LU": 32003, | |
| "zKU7x": 32043 | |
| } | |