asadfgglie/BanBan-generated-dataset-v2
Viewer • Updated • 800 • 3
How to use asadfgglie/banban-vision-8b-v1.2-zh with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="asadfgglie/banban-vision-8b-v1.2-zh")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
pipe(text=messages) # Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("asadfgglie/banban-vision-8b-v1.2-zh")
model = AutoModelForMultimodalLM.from_pretrained("asadfgglie/banban-vision-8b-v1.2-zh")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use asadfgglie/banban-vision-8b-v1.2-zh with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "asadfgglie/banban-vision-8b-v1.2-zh"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "asadfgglie/banban-vision-8b-v1.2-zh",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/asadfgglie/banban-vision-8b-v1.2-zh
How to use asadfgglie/banban-vision-8b-v1.2-zh with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "asadfgglie/banban-vision-8b-v1.2-zh" \
--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": "asadfgglie/banban-vision-8b-v1.2-zh",
"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 "asadfgglie/banban-vision-8b-v1.2-zh" \
--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": "asadfgglie/banban-vision-8b-v1.2-zh",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use asadfgglie/banban-vision-8b-v1.2-zh with Docker Model Runner:
docker model run hf.co/asadfgglie/banban-vision-8b-v1.2-zh
AI VTuber板板模型。
目標是打造屬於NTNU VLSI的專屬AI VT!
目前僅開放給NTNU VLSI社員。如果你是社員,並想要取得本模型的權重,請至Discord聯繫我。
這個模型主要是使用了部分高質量的AI合成資料來做訓練,輔以少量的人類數據來做訓練。
至少這個版本目前比較好跟上話題了,比較不會像之前的版本(e.g. beta, pretrain version)那樣,容易因為一個錯誤的、低質量的回應導致模型接下來都無法正常回應,只能清空對話紀錄重新開始。
Base model
xtuner/llava-llama-3-8b-v1_1-transformers