Instructions to use huggingtweets/l2k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/l2k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/l2k")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/l2k") model = AutoModelForCausalLM.from_pretrained("huggingtweets/l2k", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingtweets/l2k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/l2k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/l2k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/l2k
- SGLang
How to use huggingtweets/l2k 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 "huggingtweets/l2k" \ --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": "huggingtweets/l2k", "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 "huggingtweets/l2k" \ --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": "huggingtweets/l2k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/l2k with Docker Model Runner:
docker model run hf.co/huggingtweets/l2k
Commit History
-
upload flax model
1d8f3d9 -
allow flax
c4c10d8
-
Update special_tokens_map.json
efc7fad -
Update pytorch_model.bin
00f4536 -
Update config.json
072b5d7 -
Update tokenizer_config.json
ce61b24 -
Update merges.txt
5737de0 -
Update README.md
51a412f -
Update vocab.json
c237009
-
Update config.json
34a7c07 -
Update README.md
9cfc773 -
Update special_tokens_map.json
8888fce -
Update tokenizer_config.json
1d811e6 -
Update merges.txt
eae3a72 -
Update vocab.json
f3ae99c -
Update config.json
298e35c -
Update vocab.json
7ed6d24 -
Update README.md
2d68b9e -
Update special_tokens_map.json
e4b151f -
Update tokenizer_config.json
0027581 -
Update merges.txt
126e7fc -
Update config.json
f381f5e -
Update vocab.json
1679925 -
Update README.md
6e9fac1 -
Update special_tokens_map.json
8294b47 -
Update tokenizer_config.json
eefd95f -
Update merges.txt
2916d86
-
Update README.md
8b10654 -
Update special_tokens_map.json
7617024 -
Update vocab.json
265e0ce -
Update tokenizer_config.json
045d9e0 -
Update config.json
e0ae76e -
Update merges.txt
5bb76cc
-
Update vocab.json
615eefb -
Update README.md
be73109 -
Update special_tokens_map.json
6b7d425 -
Update tokenizer_config.json
67aceaa -
Update config.json
37ad442 -
Update merges.txt
116d7cd -
Update vocab.json
9524304 -
Update README.md
ce00ca3 -
Update special_tokens_map.json
0e030dc -
Update merges.txt
cae79dd -
Update tokenizer_config.json
947c5b6 -
Update config.json
efcc52f
-
Update merges.txt
d63163a -
Update README.md
e625418 -
Update config.json
d7a5f5b -
Update special_tokens_map.json
b32d0b7 -
Update vocab.json
bdffd92