Run this model with HF Jobs
Run katanemo/Arch-Function-7B 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/katanemo/Arch-Function-7B. 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/katanemo/Arch-Function-7B 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/katanemo/Arch-Function-7B. 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/katanemo/Arch-Function-7B. 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 katanemo/Arch-Function-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use katanemo/Arch-Function-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="katanemo/Arch-Function-7B") 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("katanemo/Arch-Function-7B") model = AutoModelForCausalLM.from_pretrained("katanemo/Arch-Function-7B", 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 katanemo/Arch-Function-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "katanemo/Arch-Function-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "katanemo/Arch-Function-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/katanemo/Arch-Function-7B
- SGLang
How to use katanemo/Arch-Function-7B 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 "katanemo/Arch-Function-7B" \ --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": "katanemo/Arch-Function-7B", "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 "katanemo/Arch-Function-7B" \ --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": "katanemo/Arch-Function-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use katanemo/Arch-Function-7B with Docker Model Runner:
docker model run hf.co/katanemo/Arch-Function-7B
Upload folder using huggingface_hub
Browse filesFiles changed (8)
1 unmodified line234567891011121314151617171 unmodified lines1891901911921931941959 unmodified lines205206207208209210211132 unmodified lines3443453463471 unmodified linelicense: otherlicense_name: katanemo-researchlicense_link: >-https://huggingface.co/katanemolabs/Arch-Function-1.5B/blob/main/LICENSEbase_model:- Qwen/Qwen2.5-1.5B-Instructlanguage:- enpipeline_tag: text-generationlibrary_name: transformers---# katanemo/Arch-Function-1.5B## OverviewThe Katanemo Arch-Function collection of large language models (LLMs) is a collection state-of-the-art (SOTA) LLMs specifically designed for **function calling** tasks. The models are designed to understand complex function signatures, identify required parameters, and produce accurate function call outputs based on natural language prompts. Achieving performance on par with GPT-4, these models set a new benchmark in the domain of function-oriented tasks, making them suitable for scenarios where automated API interaction and function execution is crucial.171 unmodified lines# RequirementsThe code of Arch-Function-1.5B has been in the Hugging Face `transformers` library and we advise you to install latest version:```bashpip install transformers>=4.37.0```9 unmodified linesfrom typing import Any, Dict, Listfrom transformers import AutoModelForCausalLM, AutoTokenizermodel_name = "katanemo/Arch-Function-1.5B"model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)132 unmodified lines# LicenseKatanemo Arch-Function collection is distributed under the [Katanemo license](https://huggingface.co/katanemolabs/Arch-Function-1.5B/blob/main/LICENSE).1 unmodified line234567891011121314151617171 unmodified lines1891901911921931941959 unmodified lines205206207208209210211132 unmodified lines3443453463471 unmodified linelicense: otherlicense_name: katanemo-researchlicense_link: >-https://huggingface.co/katanemolabs/Arch-Function-7B/blob/main/LICENSEbase_model:- Qwen/Qwen2.5-Coder-7B-Instructlanguage:- enpipeline_tag: text-generationlibrary_name: transformers---# katanemo/Arch-Function-7B## OverviewThe Katanemo Arch-Function collection of large language models (LLMs) is a collection state-of-the-art (SOTA) LLMs specifically designed for **function calling** tasks. The models are designed to understand complex function signatures, identify required parameters, and produce accurate function call outputs based on natural language prompts. Achieving performance on par with GPT-4, these models set a new benchmark in the domain of function-oriented tasks, making them suitable for scenarios where automated API interaction and function execution is crucial.171 unmodified lines# RequirementsThe code of Arch-Function-7B has been in the Hugging Face `transformers` library and we advise you to install latest version:```bashpip install transformers>=4.37.0```9 unmodified linesfrom typing import Any, Dict, Listfrom transformers import AutoModelForCausalLM, AutoTokenizermodel_name = "katanemo/Arch-Function-7B"model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)132 unmodified lines# LicenseKatanemo Arch-Function collection is distributed under the [Katanemo license](https://huggingface.co/katanemolabs/Arch-Function-7B/blob/main/LICENSE).
12345{"_name_or_path": "Qwen/Qwen2.5-7B-Instruct","architectures": ["Qwen2ForCausalLM"],12345{"_name_or_path": "Qwen/Qwen2.5-Coder-7B-Instruct","architectures": ["Qwen2ForCausalLM"],
5 unmodified lines67891011125 unmodified lines151643],"pad_token_id": 151643,"repetition_penalty": 1.05,"temperature": 0.7,"top_k": 20,"top_p": 0.8,5 unmodified lines67891011125 unmodified lines151643],"pad_token_id": 151643,"repetition_penalty": 1.1,"temperature": 0.7,"top_k": 20,"top_p": 0.8,
123version https://git-lfs.github.com/spec/v1oid sha256:c4a3225f3bd8bd745f9e3bcf9d3f85740fa2e0f4f7ef128a34cb7e600b23d696size 4877660776123version https://git-lfs.github.com/spec/v1oid sha256:d8abb832df26607133070162af8b38bde0b957721ab2f0ae4a0bec3a9b1a034csize 4877660776
123version https://git-lfs.github.com/spec/v1oid sha256:b702310b1513c2e44d589060678b27ad1c5c86b2084da2e94a86a2de44b63567size 4932751008123version https://git-lfs.github.com/spec/v1oid sha256:b01fada6c3fcd7787462e62cbbbb847e5868540176bd373743c2c0c4b8f248cfsize 4932751008
123version https://git-lfs.github.com/spec/v1oid sha256:235c7ff384c0a922e7dfc469f04f513d9f973a79040e2c91cfa24ec9d1c8ffe5size 4330865200123version https://git-lfs.github.com/spec/v1oid sha256:557ad1e1ef465fd0c38914b6f302f834b55f31379a812d8372b7970340ce3cbfsize 4330865200
123version https://git-lfs.github.com/spec/v1oid sha256:a8327b8350d03d01aeee592f961468bcee38a343ce658071f09ccb17f76ea36bsize 1089994880123version https://git-lfs.github.com/spec/v1oid sha256:f5b8d144bc96bff9ad28b710421d34accc6461c5b5ce479c47ab26a429d9969bsize 1089994880
198 unmodified lines199200201202203204205206207198 unmodified lines"clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","errors": "replace","model_max_length": 131072,"pad_token": "<|endoftext|>","split_special_tokens": false,"tokenizer_class": "Qwen2Tokenizer","unk_token": null}198 unmodified lines199200201202203204205206207198 unmodified lines"clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","errors": "replace","model_max_length": 32768,"pad_token": "<|endoftext|>","split_special_tokens": false,"tokenizer_class": "Qwen2Tokenizer","unk_token": null}
README.md+6-6
config.json+1-1
generation_config.json+1-1
model-00001-of-00004.safetensors+1-1
model-00002-of-00004.safetensors+1-1
model-00003-of-00004.safetensors+1-1
model-00004-of-00004.safetensors+1-1
tokenizer_config.json+2-2