Text Generation
Transformers
Safetensors
llama
grpo
protocol-completion
fine-tuned
conversational
text-generation-inference
Instructions to use FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps") model = AutoModelForCausalLM.from_pretrained("FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps
- SGLang
How to use FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps 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 "FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps" \ --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": "FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps", "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 "FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps" \ --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": "FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps with Docker Model Runner:
docker model run hf.co/FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps
Fine-tuned Llama Model with GRPO
This model is a fine-tuned version of FrontierInstruments/finetuning_llama_grpo_50_8gpu_1000steps using Group Relative Policy Optimization (GRPO).
Training Details
- Base Model: FrontierInstruments/finetuning_llama_grpo_50_8gpu_1000steps
- Training Method: GRPO (Group Relative Policy Optimization)
- Training Steps: 1000
- Dataset: Protocol completion task dataset (FULL)
- Hardware: 8x GPU distributed training with DeepSpeed ZeRO-3
- Precision: FP16
Model Description
This model has been fine-tuned specifically for protocol completion tasks, using custom reward functions that evaluate:
- Semantic correctness of protocol steps
- Proper XML format adherence
- Step-by-step reasoning quality
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("FrontierInstruments/finetuning_llama_grpo_full_8gpu_1000steps")
# Generate text
inputs = tokenizer("Your prompt here", return_tensors="pt")
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training Configuration
- LoRA rank: 32
- LoRA alpha: 64
- Learning rate: 1e-5
- Batch size: 8 (effective)
- Max sequence length: 1024
- Beta (GRPO): 0.05
- Downloads last month
- 7