Text Generation
Transformers
Safetensors
English
qwen3
tool-calling
function-calling
lora
sft
trl
zynthetix
conversational
text-generation-inference
Instructions to use karthik-2905/AL1-model-B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use karthik-2905/AL1-model-B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="karthik-2905/AL1-model-B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("karthik-2905/AL1-model-B") model = AutoModelForCausalLM.from_pretrained("karthik-2905/AL1-model-B", 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 karthik-2905/AL1-model-B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "karthik-2905/AL1-model-B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "karthik-2905/AL1-model-B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/karthik-2905/AL1-model-B
- SGLang
How to use karthik-2905/AL1-model-B 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 "karthik-2905/AL1-model-B" \ --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": "karthik-2905/AL1-model-B", "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 "karthik-2905/AL1-model-B" \ --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": "karthik-2905/AL1-model-B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use karthik-2905/AL1-model-B with Docker Model Runner:
docker model run hf.co/karthik-2905/AL1-model-B
| {"id": "chat_1", "kind": "general", "query": "Explain what a hash map is in two sentences."} | |
| {"id": "chat_2", "kind": "code", "query": "Write a Python function that reverses a string."} | |
| {"id": "chat_3", "kind": "general", "query": "What's the difference between TCP and UDP?"} | |
| {"id": "chat_4", "kind": "code", "query": "Write a bash one-liner to count the total lines across all .py files in a folder."} | |
| {"id": "chat_5", "kind": "general", "query": "Give me three practical tips for better sleep."} | |
| {"id": "chat_6", "kind": "code", "query": "Write a Python function to check whether a number is prime."} | |
| {"id": "chat_7", "kind": "general", "query": "I keep procrastinating on a side project. Give me concrete advice."} | |
| {"id": "chat_8", "kind": "code", "query": "Write a SQL query returning the top 5 customers by total order value from an orders table."} | |
| {"id": "chat_9", "kind": "general", "query": "Summarize the plot of Romeo and Juliet in three lines."} | |
| {"id": "chat_10", "kind": "code", "query": "Write a Python list comprehension that returns the squares of even numbers from 0 to 20."} |