MIA Challenge
Collection
2 items • Updated
How to use MatanBT/mia-target-model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="MatanBT/mia-target-model") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("MatanBT/mia-target-model")
model = AutoModelForCausalLM.from_pretrained("MatanBT/mia-target-model")How to use MatanBT/mia-target-model with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "MatanBT/mia-target-model"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "MatanBT/mia-target-model",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/MatanBT/mia-target-model
How to use MatanBT/mia-target-model with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "MatanBT/mia-target-model" \
--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": "MatanBT/mia-target-model",
"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 "MatanBT/mia-target-model" \
--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": "MatanBT/mia-target-model",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use MatanBT/mia-target-model with Docker Model Runner:
docker model run hf.co/MatanBT/mia-target-model
Fine-tuned language model for Week 7 membership inference exercise.
See course materials for instructions.
Load the model using the following code:
tokenizer = AutoTokenizer.from_pretrained("matanbt/mia-target-model")
model = AutoModelForCausalLM.from_pretrained("matanbt/mia-target-model")
Base model
google/gemma-3-1b-pt