Text Generation
Transformers
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Instructions to use Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2") 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("Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2") model = AutoModelForCausalLM.from_pretrained("Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2
- SGLang
How to use Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2 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 "Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2" \ --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": "Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2", "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 "Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2" \ --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": "Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2 with Docker Model Runner:
docker model run hf.co/Grogros/Llama-3.2-1B-Instruct-distillation-CodeAlpaca-1.5-BadCode-ran2
Commit History
-
Upload finetuning_config.yaml with huggingface_hub
Verified signaturef68cfcd -
Upload tokenizer
Verified signature58ada58 -
Model save
Verified signatureef3e5c4 -
Training in progress, step 2000, checkpoint
Verified signature6ba691e -
Training in progress, step 2000
Verified signature19e8456 -
Training in progress, step 1500, checkpoint
Verified signature571fa93 -
Training in progress, step 1500
Verified signature858a349 -
Training in progress, step 1000, checkpoint
Verified signaturecf9279d -
Training in progress, step 1000
Verified signature3e6aea5 -
Training in progress, step 500, checkpoint
Verified signatured0410ed -
Training in progress, step 500
Verified signature8ee48b3 -
initial commit
Verified signature671f8de