legacy-datasets/wikipedia
Updated • 122k • 632
How to use yasmeenimron/masa-ai-qa with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="yasmeenimron/masa-ai-qa") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("yasmeenimron/masa-ai-qa")
model = AutoModelForCausalLM.from_pretrained("yasmeenimron/masa-ai-qa")How to use yasmeenimron/masa-ai-qa with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "yasmeenimron/masa-ai-qa"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "yasmeenimron/masa-ai-qa",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/yasmeenimron/masa-ai-qa
How to use yasmeenimron/masa-ai-qa with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "yasmeenimron/masa-ai-qa" \
--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": "yasmeenimron/masa-ai-qa",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "yasmeenimron/masa-ai-qa" \
--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": "yasmeenimron/masa-ai-qa",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use yasmeenimron/masa-ai-qa with Docker Model Runner:
docker model run hf.co/yasmeenimron/masa-ai-qa
Model bahasa Indonesia yang di-fine-tune untuk menjawab pertanyaan sederhana.
from transformers import GPT2LMHeadModel, AutoTokenizer
model = GPT2LMHeadModel.from_pretrained("yasmeenimron/masa-ai-qa")
tokenizer = AutoTokenizer.from_pretrained("yasmeenimron/masa-ai-qa")
prompt = "Pertanyaan: Apa ibu kota Indonesia?\nJawaban:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Model ini di-fine-tune dari yasmeenimron/masa-ai
MIT License
docker model run hf.co/yasmeenimron/masa-ai-qa