Text Generation
Transformers
Safetensors
llama
code
energy-efficient-code-generation
green-software-engineering
merged
text-generation-inference
Instructions to use saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft") model = AutoModelForCausalLM.from_pretrained("saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft
- SGLang
How to use saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft 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 "saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft" \ --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": "saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft", "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 "saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft" \ --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": "saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft with Docker Model Runner:
docker model run hf.co/saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft
DeepSeek-Coder-6.7B Energy-SFT
Part of the Green Tea replication package for Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learning (Rajput and Sharma). Energy-contrastive supervised fine-tuning. On the 143-problem held-out benchmark it achieves 1.29% CARET (Correctness-Adjusted Reduction in Energy Total).
- Base model:
deepseek-ai/deepseek-coder-6.7b-base - Training: Energy-contrastive supervised fine-tuning
- Code and full replication: https://github.com/SMART-Dal/green-tea
- Dataset (Zenodo): https://doi.org/10.5281/zenodo.21210099
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained('saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft', device_map='auto')
t = AutoTokenizer.from_pretrained('saurabh-singh-rajput/green-tea-deepseek-coder-6.7b-energy-sft')
Citation
@misc{rajput2026greentea,
title={Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learning},
author={Rajput, Saurabhsingh and Sharma, Tushar},
year={2026},
note={Preprint}
}
- Downloads last month
- 414