Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
sft
trl
conversational
text-generation-inference
Instructions to use ramachetan22/MyGemmaNPC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ramachetan22/MyGemmaNPC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ramachetan22/MyGemmaNPC") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ramachetan22/MyGemmaNPC") model = AutoModelForCausalLM.from_pretrained("ramachetan22/MyGemmaNPC", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ramachetan22/MyGemmaNPC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ramachetan22/MyGemmaNPC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ramachetan22/MyGemmaNPC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ramachetan22/MyGemmaNPC
- SGLang
How to use ramachetan22/MyGemmaNPC 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 "ramachetan22/MyGemmaNPC" \ --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": "ramachetan22/MyGemmaNPC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ramachetan22/MyGemmaNPC" \ --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": "ramachetan22/MyGemmaNPC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ramachetan22/MyGemmaNPC with Docker Model Runner:
docker model run hf.co/ramachetan22/MyGemmaNPC
Model save
Browse filesFiles changed (2)
123version https://git-lfs.github.com/spec/v1oid sha256:62d1e476857805df13ce3f583a275c4715e1f4fc0d31ab0558aaa281263c840fsize 536223056123version https://git-lfs.github.com/spec/v1oid sha256:0803cfddb72e887ed95f19920bbc2ec43568c0940caf511115489a1700f1fa5dsize 536223056
123version https://git-lfs.github.com/spec/v1oid sha256:03c068369094e43f677b0c053bacda7e83f07db251ee7e3e7d94195f8195e1e9size 20818123version https://git-lfs.github.com/spec/v1oid sha256:a331ee6e1846e627ab1e8eb676afe1c50dc873eaf1a0b268bc66877873666c40size 23472
model.safetensors+1-1
runs/Oct10_18-13-37_609f0ddd3306/events.out.tfevents.1791656017.609f0ddd3306.560.0+2-2