Instructions to use whynlp/pccot-llama1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use whynlp/pccot-llama1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="whynlp/pccot-llama1b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("whynlp/pccot-llama1b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use whynlp/pccot-llama1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "whynlp/pccot-llama1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whynlp/pccot-llama1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/whynlp/pccot-llama1b
- SGLang
How to use whynlp/pccot-llama1b 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 "whynlp/pccot-llama1b" \ --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": "whynlp/pccot-llama1b", "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 "whynlp/pccot-llama1b" \ --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": "whynlp/pccot-llama1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use whynlp/pccot-llama1b with Docker Model Runner:
docker model run hf.co/whynlp/pccot-llama1b
Download pccot_args.json from whynlp/pccot-llama1b: direct link, hf CLI and curl.
- Browser
- Download file 427 Bytes
-
https://huggingface.co/whynlp/pccot-llama1b/resolve/main/pccot_args.json
- Command line
-
hf download hf://whynlp/pccot-llama1b/pccot_args.json
-
curl -L -o pccot_args.json https://huggingface.co/whynlp/pccot-llama1b/resolve/main/pccot_args.json
427 Bytes
| { | |
| "bot_token_id": 128256, | |
| "eot_token_id": 128257, | |
| "latent_token_id": 128258, | |
| "label_pad_token_id": -100, | |
| "use_chat_template": false, | |
| "answer_prompt": "The answer is:", | |
| "num_latent_tokens": 24, | |
| "use_peft": true, | |
| "lora_r": 128, | |
| "lora_alpha": 32, | |
| "lora_dropout": 0.1, | |
| "lora_target_modules": "q_proj-k_proj-v_proj-o_proj-down_proj-up_proj-gate_proj", | |
| "lora_modules_to_save": "" | |
| } |