Instructions to use genaforvena/study-toy_passage_ppl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use genaforvena/study-toy_passage_ppl with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-360M-Instruct") model = PeftModel.from_pretrained(base_model, "genaforvena/study-toy_passage_ppl") - Transformers
How to use genaforvena/study-toy_passage_ppl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="genaforvena/study-toy_passage_ppl")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("genaforvena/study-toy_passage_ppl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use genaforvena/study-toy_passage_ppl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "genaforvena/study-toy_passage_ppl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "genaforvena/study-toy_passage_ppl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/genaforvena/study-toy_passage_ppl
- SGLang
How to use genaforvena/study-toy_passage_ppl 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 "genaforvena/study-toy_passage_ppl" \ --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": "genaforvena/study-toy_passage_ppl", "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 "genaforvena/study-toy_passage_ppl" \ --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": "genaforvena/study-toy_passage_ppl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use genaforvena/study-toy_passage_ppl with Docker Model Runner:
docker model run hf.co/genaforvena/study-toy_passage_ppl
Download study-adapter.json from genaforvena/study-toy_passage_ppl: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/genaforvena/study-toy_passage_ppl/resolve/main/study-adapter.json
- Command line
-
hf download hf://genaforvena/study-toy_passage_ppl/study-adapter.json
-
curl -L -o study-adapter.json https://huggingface.co/genaforvena/study-toy_passage_ppl/resolve/main/study-adapter.json
1.36 kB
| { | |
| "adapter_id": "study-toy_passage_ppl", | |
| "adapter_tree_digest": "8963cee308260323ee6875d50077a81c70d2288451b9c69d5399767c9ca4ee69", | |
| "base_model": { | |
| "id": "HuggingFaceTB/SmolLM2-360M-Instruct", | |
| "revision": "a10cc1512eabd3dde888204e902eca88bddb4951" | |
| }, | |
| "config": { | |
| "adapter": { | |
| "alpha": 32, | |
| "batch_size": 2, | |
| "dropout": 0.05, | |
| "epochs": 5, | |
| "gradient_accumulation": 1, | |
| "learning_rate": 0.0002, | |
| "max_length": 256, | |
| "method": "LoRA", | |
| "r": 16, | |
| "target_modules": [ | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ] | |
| }, | |
| "model": { | |
| "base_id": "HuggingFaceTB/SmolLM2-360M-Instruct", | |
| "base_revision": "a10cc1512eabd3dde888204e902eca88bddb4951" | |
| }, | |
| "seed": 17, | |
| "source": "corpus/study-v1/train.jsonl" | |
| }, | |
| "config_sha256": "0e895d02eaa868593a1fe60c76c7d8d0dfbd4dfcdb3f082b9cddcc396b44ad17", | |
| "corpus_manifest_sha256": "2259fad8ba4fc3134d9de5ff4885e4898ae82192d10b4a2ca90aead7d8726dbc", | |
| "domains": [ | |
| "toy_passage_ppl" | |
| ], | |
| "epochs": 5, | |
| "mean_loss": 0.17142438440024851, | |
| "role": "specialist", | |
| "status": "complete", | |
| "study_id": "fleet-study-v1", | |
| "train_corpus_sha256": "b208a7dab05a34494e9672facb27341ec70d512b4f7b6f1df02d7d72b4188f4f", | |
| "train_rows": 100 | |
| } | |