tellang/yeji-fortune-telling-ko-v3
Viewer โข Updated โข 35.6k โข 142
How to use tellang/yeji-8b-rslora-v7-AWQ with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="tellang/yeji-8b-rslora-v7-AWQ")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("tellang/yeji-8b-rslora-v7-AWQ")
model = AutoModelForCausalLM.from_pretrained("tellang/yeji-8b-rslora-v7-AWQ")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use tellang/yeji-8b-rslora-v7-AWQ with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "tellang/yeji-8b-rslora-v7-AWQ"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "tellang/yeji-8b-rslora-v7-AWQ",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/tellang/yeji-8b-rslora-v7-AWQ
How to use tellang/yeji-8b-rslora-v7-AWQ with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "tellang/yeji-8b-rslora-v7-AWQ" \
--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": "tellang/yeji-8b-rslora-v7-AWQ",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "tellang/yeji-8b-rslora-v7-AWQ" \
--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": "tellang/yeji-8b-rslora-v7-AWQ",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use tellang/yeji-8b-rslora-v7-AWQ with Docker Model Runner:
docker model run hf.co/tellang/yeji-8b-rslora-v7-AWQ
yeji-8b-rslora-v7์ AWQ 4-bit ์์ํ ๋ฒ์ .
YEJI 8B ์ฃผ๋ ฅ ๋ชจ๋ธ์ AWQ ์์ํ ๋ฒ์ ์ ๋๋ค. ์๋ณธ 8.2B ํ๋ผ๋ฏธํฐ๋ฅผ 4-bit๋ก ์์ํํ์ฌ GPU ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋์ ๋ํญ ์ค์ด๊ณ vLLM ์๋น์ ์ต์ ํํ์ต๋๋ค.
python -m vllm.entrypoints.openai.api_server \
--model tellang/yeji-8b-rslora-v7-AWQ \
--quantization awq \
--max-model-len 4096
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"tellang/yeji-8b-rslora-v7-AWQ",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("tellang/yeji-8b-rslora-v7-AWQ")
| Model | Params | Type | Downloads |
|---|---|---|---|
| yeji-8b-rslora-v7 | 8.2B | Full | 345 |
| yeji-8b-rslora-v7-AWQ | ~2.5B | AWQ 4-bit | 371 |
| yeji-4b-instruct-v9 | 4.0B | Full | 65 |
| yeji-4b-instruct-v9-AWQ | ~1.3B | AWQ 4-bit | 138 |