Text Generation
Transformers
PyTorch
Safetensors
GGUF
English
llama
text-generation-inference
unsloth
trl
sft
conversational
Run this model with HF Jobs
Run Ramikan-BR/tinyllama-coder-py-v17 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Ramikan-BR/tinyllama-coder-py-v17. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Ramikan-BR/tinyllama-coder-py-v17 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Ramikan-BR/tinyllama-coder-py-v17. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use Ramikan-BR/tinyllama-coder-py-v17 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ramikan-BR/tinyllama-coder-py-v17 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ramikan-BR/tinyllama-coder-py-v17") 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("Ramikan-BR/tinyllama-coder-py-v17") model = AutoModelForCausalLM.from_pretrained("Ramikan-BR/tinyllama-coder-py-v17", 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
- llama.cpp
How to use Ramikan-BR/tinyllama-coder-py-v17 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M # Run inference directly in the terminal: llama cli -hf Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M # Run inference directly in the terminal: llama cli -hf Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
Use Docker
docker model run hf.co/Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Ramikan-BR/tinyllama-coder-py-v17 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ramikan-BR/tinyllama-coder-py-v17" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ramikan-BR/tinyllama-coder-py-v17", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
- SGLang
How to use Ramikan-BR/tinyllama-coder-py-v17 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 "Ramikan-BR/tinyllama-coder-py-v17" \ --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": "Ramikan-BR/tinyllama-coder-py-v17", "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 "Ramikan-BR/tinyllama-coder-py-v17" \ --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": "Ramikan-BR/tinyllama-coder-py-v17", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Ramikan-BR/tinyllama-coder-py-v17 with Ollama:
ollama run hf.co/Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Ramikan-BR/tinyllama-coder-py-v17 with Docker Model Runner:
docker model run hf.co/Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
- Lemonade
How to use Ramikan-BR/tinyllama-coder-py-v17 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Ramikan-BR/tinyllama-coder-py-v17:Q4_K_M
Run and chat with the model
lemonade run user.tinyllama-coder-py-v17-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Update config.json
Browse files123455 unmodified lines111213141516171 unmodified line19202122232425262728293031323334{"_name_or_path": "unsloth/tinyllama-chat-bnb-4bit","architectures": ["LlamaForCausalLM"],5 unmodified lines"hidden_size": 2048,"initializer_range": 0.02,"intermediate_size": 5632,"max_position_embeddings": 4096,"mlp_bias": false,"model_type": "llama","num_attention_heads": 32,1 unmodified line"num_key_value_heads": 4,"pad_token_id": 0,"pretraining_tp": 1,"rms_norm_eps": 1e-05,"rope_scaling": {"factor": 2.0,"type": "linear"},"rope_theta": 10000.0,"tie_word_embeddings": false,"torch_dtype": "float16","transformers_version": "4.41.1","unsloth_version": "2024.5","use_cache": true,"vocab_size": 32000}123455 unmodified lines111213141516171 unmodified line1920212223242526272829303132333435363738394041424344{"_name_or_path": "TinyLlama/TinyLlama-1.1B-Chat-v1.0","architectures": ["LlamaForCausalLM"],5 unmodified lines"hidden_size": 2048,"initializer_range": 0.02,"intermediate_size": 5632,"max_position_embeddings": 2048,"mlp_bias": false,"model_type": "llama","num_attention_heads": 32,1 unmodified line"num_key_value_heads": 4,"pad_token_id": 0,"pretraining_tp": 1,"quantization_config": {"_load_in_4bit": true,"_load_in_8bit": false,"bnb_4bit_compute_dtype": "bfloat16","bnb_4bit_quant_type": "nf4","bnb_4bit_use_double_quant": true,"llm_int8_enable_fp32_cpu_offload": false,"llm_int8_has_fp16_weight": false,"llm_int8_skip_modules": null,"llm_int8_threshold": 6.0,"load_in_4bit": true,"load_in_8bit": false,"quant_method": "bitsandbytes"},"rms_norm_eps": 1e-05,"rope_scaling": null,"rope_theta": 10000.0,"tie_word_embeddings": false,"torch_dtype": "bfloat16","transformers_version": "4.41.1","use_cache": true,"vocab_size": 32000}
config.json+18-8