Instructions to use genaforvena/study-executable_code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use genaforvena/study-executable_code 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-executable_code") - Transformers
How to use genaforvena/study-executable_code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="genaforvena/study-executable_code")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("genaforvena/study-executable_code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use genaforvena/study-executable_code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "genaforvena/study-executable_code" # 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-executable_code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/genaforvena/study-executable_code
- SGLang
How to use genaforvena/study-executable_code 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-executable_code" \ --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-executable_code", "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-executable_code" \ --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-executable_code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use genaforvena/study-executable_code with Docker Model Runner:
docker model run hf.co/genaforvena/study-executable_code
| { | |
| "adapter_id": "study-executable_code", | |
| "adapter_tree_digest": "11dffdb7e1250a38d48edcba1cefa5410c2d767e2db88bff98adbacaef0a0216", | |
| "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": [ | |
| "executable_code" | |
| ], | |
| "epochs": 5, | |
| "mean_loss": 0.14086018255725502, | |
| "role": "specialist", | |
| "status": "complete", | |
| "study_id": "fleet-study-v1", | |
| "train_corpus_sha256": "b208a7dab05a34494e9672facb27341ec70d512b4f7b6f1df02d7d72b4188f4f", | |
| "train_rows": 100 | |
| } | |