Instructions to use lievan/poetry with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lievan/poetry with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lievan/poetry")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("lievan/poetry", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lievan/poetry with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lievan/poetry" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lievan/poetry", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lievan/poetry
- SGLang
How to use lievan/poetry 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 "lievan/poetry" \ --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": "lievan/poetry", "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 "lievan/poetry" \ --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": "lievan/poetry", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lievan/poetry with Docker Model Runner:
docker model run hf.co/lievan/poetry
Upload ./ with huggingface_hub
#3
by YYChen - opened
- added_tokens.json +1 -0
- config.json +31 -0
- eval_results.txt +3 -0
- merges.txt +0 -0
- pytorch_model-001.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.json +0 -0
added_tokens.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"<dense-vectors>": 50257, "<tokens>": 50258, "<verb>": 50259, "<ARG0>": 50260, "<ARG1>": 50261, "<global-dense-vectors>": 50262, "<pad>": 50263, "<bos>": 50264, "<eos>": 50265}
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"GPT2LMHeadModel"
|
| 4 |
+
],
|
| 5 |
+
"attn_pdrop": 0.1,
|
| 6 |
+
"embd_pdrop": 0.1,
|
| 7 |
+
"extra_embedding_dim": 768,
|
| 8 |
+
"finetuning_task": null,
|
| 9 |
+
"initializer_range": 0.02,
|
| 10 |
+
"is_decoder": false,
|
| 11 |
+
"layer_norm_epsilon": 1e-05,
|
| 12 |
+
"n_ctx": 1024,
|
| 13 |
+
"n_embd": 1280,
|
| 14 |
+
"n_head": 20,
|
| 15 |
+
"n_layer": 36,
|
| 16 |
+
"n_positions": 1024,
|
| 17 |
+
"num_labels": 1,
|
| 18 |
+
"output_attentions": false,
|
| 19 |
+
"output_hidden_states": false,
|
| 20 |
+
"output_past": true,
|
| 21 |
+
"pruned_heads": {},
|
| 22 |
+
"resid_pdrop": 0.1,
|
| 23 |
+
"summary_activation": null,
|
| 24 |
+
"summary_first_dropout": 0.1,
|
| 25 |
+
"summary_proj_to_labels": true,
|
| 26 |
+
"summary_type": "cls_index",
|
| 27 |
+
"summary_use_proj": true,
|
| 28 |
+
"torchscript": false,
|
| 29 |
+
"use_bfloat16": false,
|
| 30 |
+
"vocab_size": 50266
|
| 31 |
+
}
|
eval_results.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
accuracy = 0.0000, (0 / 2987)
|
| 2 |
+
accuracy_tokens = 0.0000, (0 / 747)
|
| 3 |
+
perplexity = tensor(9.4944)
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model-001.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcd65275b4872b8f3f33da752bd6142d988453d8872712b7ea0a0bb7b0e8976d
|
| 3 |
+
size 3251197111
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<bos>", "eos_token": "<eos>", "unk_token": "<|endoftext|>", "pad_token": "<pad>", "additional_special_tokens": ["<dense-vectors>", "<tokens>", "<verb>", "<ARG0>", "<ARG1>", "<global-dense-vectors>"]}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"do_lower_case": false, "max_len": 1024, "init_inputs": []}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d27f1de2fc34fb2b74e8b325aad9de50b36bddcb570dea3470a8752bb468fd6
|
| 3 |
+
size 2059
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|