Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
edit-prediction
next-edit-suggestion
Instructions to use zed-industries/zeta-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zed-industries/zeta-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zed-industries/zeta-2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zed-industries/zeta-2") model = AutoModelForCausalLM.from_pretrained("zed-industries/zeta-2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zed-industries/zeta-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zed-industries/zeta-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zed-industries/zeta-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zed-industries/zeta-2
- SGLang
How to use zed-industries/zeta-2 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 "zed-industries/zeta-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zed-industries/zeta-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "zed-industries/zeta-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zed-industries/zeta-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use zed-industries/zeta-2 with Docker Model Runner:
docker model run hf.co/zed-industries/zeta-2
| <[fim-suffix]> | |
| output_path: Option<PathBuf>, | |
| ) -> Self { | |
| Self { | |
| src_path, | |
| header_paths: vec![src_path], | |
| parser_path: src_path.join("parser.c"), | |
| scanner_path: None, | |
| external_files: externals, | |
| <[fim-prefix]><filename>edit_history | |
| --- a/tree-sitter/crates/loader/src/loader.rs | |
| +++ b/tree-sitter/crates/loader/src/loader.rs | |
| @@ -604,7 +604,7 @@ | |
| pub struct Loader { | |
| pub parser_lib_path: PathBuf, | |
| - languages_by_id: Vec<(PathBuf, OnceCell<Language>, Option<Vec<PathBuf>>)>, | |
| + languages_by_id: Vec<LanguageEntry>, | |
| language_configurations: Vec<LanguageConfiguration<'static>>, | |
| language_configuration_ids_by_file_type: HashMap<String, Vec<usize>>, | |
| language_configuration_in_current_path: Option<usize>, | |
| --- a/tree-sitter/crates/loader/src/loader.rs | |
| +++ b/tree-sitter/crates/loader/src/loader.rs | |
| @@ -621,6 +621,7 @@ | |
| wasm_store: Mutex<Option<tree_sitter::WasmStore>>, | |
| } | |
| +str | |
| pub struct CompileConfig<'a> { | |
| pub src_path: &'a Path, | |
| pub header_paths: Vec<&'a Path>, | |
| <filename>tree-sitter/crates/loader/src/loader.rs | |
| use_all_highlight_names: bool, | |
| _phantom: PhantomData<&'a ()>, | |
| } | |
| pub struct Loader { | |
| pub parser_lib_path: PathBuf, | |
| languages_by_id: Vec<LanguageEntry>, | |
| <<<<<<< CURRENT | |
| language_configurations: Vec<LanguageConfiguration<'static>>, | |
| language_configuration_ids_by_file_type: HashMap<String, Vec<usize>>, | |
| language_configuration_in_current_path: Option<usize>, | |
| language_configuration_ids_by_first_line_regex: HashMap<String, Vec<usize>>, | |
| highlight_names: Box<Mutex<Vec<String>>>, | |
| use_all_highlight_names: bool, | |
| debug_build: bool, | |
| sanitize_build: bool, | |
| force_rebuild: bool, | |
| wasm_store: Mutex<Option<tree_sitter::WasmStore>>, | |
| } | |
| str<|user_cursor|> | |
| pub struct CompileConfig<'a> { | |
| pub src_path: &'a Path, | |
| pub header_paths: Vec<&'a Path>, | |
| pub parser_path: PathBuf, | |
| pub scanner_path: Option<PathBuf>, | |
| pub external_files: Option<&'a [PathBuf]>, | |
| pub output_path: Option<PathBuf>, | |
| pub flags: &'a [&'a str], | |
| pub sanitize: bool, | |
| pub name: String, | |
| } | |
| impl<'a> CompileConfig<'a> { | |
| pub fn new( | |
| src_path: &'a Path, | |
| externals: Option<&'a [PathBuf]>, | |
| ======= | |
| <[fim-middle]> | |