Text Generation
PEFT
Safetensors
Transformers
qwen2
lora
coding
code-generation
conversational
text-generation-inference
Run this model with HF Jobs
Run girish00/ConicAI_LLM_model 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 to fine-tune https://huggingface.co/girish00/ConicAI_LLM_model. 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/girish00/ConicAI_LLM_model 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/girish00/ConicAI_LLM_model. 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.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/girish00/ConicAI_LLM_model. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use girish00/ConicAI_LLM_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use girish00/ConicAI_LLM_model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "girish00/ConicAI_LLM_model") - Transformers
How to use girish00/ConicAI_LLM_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="girish00/ConicAI_LLM_model") 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("girish00/ConicAI_LLM_model") model = AutoModelForCausalLM.from_pretrained("girish00/ConicAI_LLM_model", 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
- vLLM
How to use girish00/ConicAI_LLM_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "girish00/ConicAI_LLM_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "girish00/ConicAI_LLM_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/girish00/ConicAI_LLM_model
- SGLang
How to use girish00/ConicAI_LLM_model 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 "girish00/ConicAI_LLM_model" \ --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": "girish00/ConicAI_LLM_model", "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 "girish00/ConicAI_LLM_model" \ --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": "girish00/ConicAI_LLM_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use girish00/ConicAI_LLM_model with Docker Model Runner:
docker model run hf.co/girish00/ConicAI_LLM_model
update endpoint helper files
Browse files3 unmodified lines4567891 unmodified line111213141516178 unmodified lines26272829303127 unmodified lines5960616263646566676869707125 unmodified lines97989910010110210310410511 unmodified lines11711811912012112226 unmodified lines14915015115215315416 unmodified lines17117217317417517617721 unmodified lines1992002012022032043 unmodified linesimport subprocessimport sysimport timeimport requestsfrom huggingface_hub import InferenceClient, get_token1 unmodified linefrom infer_local import build_instruction_prompt, build_structured_resultdef normalize_hf_response(response):if isinstance(response, str):return response8 unmodified linesreturn str(first)if isinstance(response, dict):return str(response.get("generated_text", response.get("text", "")))return str(response)27 unmodified linesreturn bodydef call_endpoint_url(endpoint_url, token, prompt_text, generation_kwargs):headers = {"Content-Type": "application/json"}if token:headers["Authorization"] = f"Bearer {token}"payload = {"inputs": prompt_text,"parameters": generation_kwargs,"options": {"wait_for_model": True},}25 unmodified lines),file=sys.stderr,)cmd = [sys.executable,"infer_local.py","--model-path",args.fallback_model_path,"--prompt",11 unmodified linesstr(args.top_p),])completed = subprocess.run(cmd, check=True, text=True, capture_output=True)if completed.stderr:print(completed.stderr, file=sys.stderr, end="")26 unmodified linesparser.add_argument("--temperature", type=float, default=0.25)parser.add_argument("--top-p", type=float, default=0.9)parser.add_argument("--do-sample", action="store_true")args = parser.parse_args()if args.no_local_fallback:args.fallback_model_path = ""16 unmodified linesstart_time = time.perf_counter()if args.endpoint_url:try:response = call_endpoint_url(args.endpoint_url, token, prompt_text, generation_kwargs)except Exception as exc:run_local_fallback(args, str(exc))return21 unmodified linesreturnlatency_ms = int((time.perf_counter() - start_time) * 1000)generated_text = normalize_hf_response(response).strip()if generated_text.startswith(prompt_text):generated_text = generated_text[len(prompt_text) :].strip()3 unmodified lines456789101 unmodified line12131415161718192021222324252627282930313233343536378 unmodified lines464748495051525327 unmodified lines8182838485868788899091929325 unmodified lines11912012112212312412512612712811 unmodified lines14014114214314414514614726 unmodified lines17417517617717817918018118218318416 unmodified lines20120220320420520620721 unmodified lines2292302312322332342352362372383 unmodified linesimport subprocessimport sysimport timefrom pathlib import Pathimport requestsfrom huggingface_hub import InferenceClient, get_token1 unmodified linefrom infer_local import build_instruction_prompt, build_structured_resultREQUIRED_OUTPUT_KEYS = {"code","explanation","confidence","important_tokens","relevancy_score","hallucination","hallucination_check_reason","latency_ms",}def is_structured_result(payload):return isinstance(payload, dict) and REQUIRED_OUTPUT_KEYS.issubset(payload.keys())def normalize_hf_response(response):if is_structured_result(response):return json.dumps(response, ensure_ascii=False)if isinstance(response, str):return response8 unmodified linesreturn str(first)if isinstance(response, dict):if "code" in response and "explanation" in response:return json.dumps(response, ensure_ascii=False)return str(response.get("generated_text", response.get("text", "")))return str(response)27 unmodified linesreturn bodydef call_endpoint_url(endpoint_url, token, user_prompt, generation_kwargs):headers = {"Content-Type": "application/json"}if token:headers["Authorization"] = f"Bearer {token}"payload = {"inputs": user_prompt,"parameters": generation_kwargs,"options": {"wait_for_model": True},}25 unmodified lines),file=sys.stderr,)script_path = Path(__file__).resolve().with_name("infer_local.py")cmd = [sys.executable,str(script_path),"--model-path",args.fallback_model_path,"--prompt",11 unmodified linesstr(args.top_p),])if args.allow_downloads:cmd.append("--allow-downloads")completed = subprocess.run(cmd, check=True, text=True, capture_output=True)if completed.stderr:print(completed.stderr, file=sys.stderr, end="")26 unmodified linesparser.add_argument("--temperature", type=float, default=0.25)parser.add_argument("--top-p", type=float, default=0.9)parser.add_argument("--do-sample", action="store_true")parser.add_argument("--allow-downloads",action="store_true",help="Allow local fallback inference to download missing model files.",)args = parser.parse_args()if args.no_local_fallback:args.fallback_model_path = ""16 unmodified linesstart_time = time.perf_counter()if args.endpoint_url:try:response = call_endpoint_url(args.endpoint_url, token, args.prompt, generation_kwargs)except Exception as exc:run_local_fallback(args, str(exc))return21 unmodified linesreturnlatency_ms = int((time.perf_counter() - start_time) * 1000)if is_structured_result(response):print(json.dumps(response, indent=2, ensure_ascii=False))returngenerated_text = normalize_hf_response(response).strip()if generated_text.startswith(prompt_text):generated_text = generated_text[len(prompt_text) :].strip()
infer_cloud.py+38-4