Views
No views yet

ollama run hf.co/Bouquets/StrikeGPT-R1-Zero-8B-Q4_K_M-GGUF:Q4_K_M1from unsloth import FastLanguageModel
2import torch
3max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
4dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
5load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
6
7model, tokenizer = FastLanguageModel.from_pretrained(
8 model_name = "Bouquets/StrikeGPT-R1-Zero-8B",
9 max_seq_length = max_seq_length,
10 dtype = dtype,
11 load_in_4bit = load_in_4bit,
12 # token = "hf_...",
13)
14alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
15
16### Instruction:
17{}
18
19### Input:
20{}
21
22### Response:
23{}"""
24FastLanguageModel.for_inference(model) # Enable native 2x faster inference
25inputs = tokenizer(
26[
27 alpaca_prompt.format(
28 "", # instruction
29 "Hello, are you developed by OpenAI?", # input
30 "", # output - leave this blank for generation!
31 )
32], return_tensors = "pt").to("cuda")
33
34from transformers import TextStreamer
35text_streamer = TextStreamer(tokenizer, skip_prompt = True)
36_ = model.generate(input_ids = inputs.input_ids, attention_mask = inputs.attention_mask,
37 streamer = text_streamer, max_new_tokens = 4096, pad_token_id = tokenizer.eos_token_id)

This model is strictly for legal security research and educational purposes. Users must comply with local laws and regulations. Developers are not responsible for misuse.
Note: By using this model, you agree to this disclaimer.