Text Classification
Transformers
PyTorch
Safetensors
English
gemma2
text-generation
text-generation-inference
unsloth
trl
Run this model with HF Jobs
Run EpistemeAI/EpistemeAI-codegemma-2-9b 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/EpistemeAI/EpistemeAI-codegemma-2-9b. 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/EpistemeAI/EpistemeAI-codegemma-2-9b 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.
Instructions to use EpistemeAI/EpistemeAI-codegemma-2-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EpistemeAI/EpistemeAI-codegemma-2-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="EpistemeAI/EpistemeAI-codegemma-2-9b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EpistemeAI/EpistemeAI-codegemma-2-9b") model = AutoModelForCausalLM.from_pretrained("EpistemeAI/EpistemeAI-codegemma-2-9b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Update README.md
Browse files25 unmodified lines2627282930313233343536373825 unmodified lines[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)How to useThis repository contains two versions of Meta-Llama-3.1-8B-Instruct, for use with transformers and with the original llama codebase.Use with transformersStarting with transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.Make sure to update your transformers installation via pip install --upgrade transformers.```pythonfrom unsloth import FastLanguageModel25 unmodified lines26272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878825 unmodified lines[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)How to useThis repository contains two versions of Gemma-1-9B, for use with transformers and with the original llama codebase.Use with transformersStarting with transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.Make sure to update your transformers installation via pip install --upgrade transformers.You need to prepare prompt in alpaca format to generate properly:```pythondef format_test(x):if x['input']:formatted_text = f"""Below is an instruction that describes a task. \Write a response that appropriately completes the request.### Instruction:{x['instruction']}### Input:{x['input']}### Response:"""else:formatted_text = f"""Below is an instruction that describes a task. \Write a response that appropriately completes the request.### Instruction:{x['instruction']}### Response:"""return formatted_text# using code_instructions_122k_alpaca datasetPrompt = format_test(data[155])print(Prompt)```- transfomer method:```pythonfrom transformers import TextStreamerFastLanguageModel.for_inference(model) # Enable native 2x faster inferenceinputs = tokenizer([Prompt], return_tensors = "pt").to("cuda")text_streamer = TextStreamer(tokenizer)_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 512)```- unsloth method```pythonfrom unsloth import FastLanguageModel
README.md+51-1