Instructions to use jkgl/testing_v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jkgl/testing_v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jkgl/testing_v0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jkgl/testing_v0") model = AutoModelForCausalLM.from_pretrained("jkgl/testing_v0", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jkgl/testing_v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jkgl/testing_v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jkgl/testing_v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jkgl/testing_v0
- SGLang
How to use jkgl/testing_v0 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 "jkgl/testing_v0" \ --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": "jkgl/testing_v0", "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 "jkgl/testing_v0" \ --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": "jkgl/testing_v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jkgl/testing_v0 with Docker Model Runner:
docker model run hf.co/jkgl/testing_v0
Download vocab.json from jkgl/testing_v0: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/jkgl/testing_v0/resolve/main/vocab.json
- Command line
-
hf download hf://jkgl/testing_v0/vocab.json
-
curl -L -o vocab.json https://huggingface.co/jkgl/testing_v0/resolve/main/vocab.json
1.33 kB
| { | |
| "[PAD]": 0, | |
| "<s>": 1, | |
| "</s>": 2, | |
| "[INST]": 3, | |
| "[/INST]": 4, | |
| "\t": 5, | |
| "\n": 6, | |
| " ": 7, | |
| "!": 8, | |
| "\"": 9, | |
| "#": 10, | |
| "$": 11, | |
| "%": 12, | |
| "&": 13, | |
| "'": 14, | |
| "(": 15, | |
| ")": 16, | |
| "*": 17, | |
| "+": 18, | |
| ",": 19, | |
| "-": 20, | |
| ".": 21, | |
| "/": 22, | |
| "0": 23, | |
| "1": 24, | |
| "2": 25, | |
| "3": 26, | |
| "4": 27, | |
| "5": 28, | |
| "6": 29, | |
| "7": 30, | |
| "8": 31, | |
| "9": 32, | |
| ":": 33, | |
| ";": 34, | |
| "<": 35, | |
| "=": 36, | |
| ">": 37, | |
| "?": 38, | |
| "@": 39, | |
| "A": 40, | |
| "B": 41, | |
| "C": 42, | |
| "D": 43, | |
| "E": 44, | |
| "F": 45, | |
| "G": 46, | |
| "H": 47, | |
| "I": 48, | |
| "J": 49, | |
| "K": 50, | |
| "L": 51, | |
| "M": 52, | |
| "N": 53, | |
| "O": 54, | |
| "P": 55, | |
| "Q": 56, | |
| "R": 57, | |
| "S": 58, | |
| "T": 59, | |
| "U": 60, | |
| "V": 61, | |
| "W": 62, | |
| "X": 63, | |
| "Y": 64, | |
| "Z": 65, | |
| "[": 66, | |
| "]": 67, | |
| "^": 68, | |
| "_": 69, | |
| "`": 70, | |
| "a": 71, | |
| "b": 72, | |
| "c": 73, | |
| "d": 74, | |
| "e": 75, | |
| "f": 76, | |
| "g": 77, | |
| "h": 78, | |
| "i": 79, | |
| "j": 80, | |
| "k": 81, | |
| "l": 82, | |
| "m": 83, | |
| "n": 84, | |
| "o": 85, | |
| "p": 86, | |
| "q": 87, | |
| "r": 88, | |
| "s": 89, | |
| "t": 90, | |
| "u": 91, | |
| "v": 92, | |
| "w": 93, | |
| "x": 94, | |
| "y": 95, | |
| "z": 96, | |
| "{": 97, | |
| "|": 98, | |
| "}": 99, | |
| "~": 100 | |
| } |