Downloads · 30 days
655
7% of all-time downloads
RichardErkhov/tomasonjo_-_text2cypher-demo-16bit-gguf
tomasonjo_-_text2cypher-demo-16bit-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
655
7% of all-time downloads
All-time downloads
8.8K
Public
Repo size
92.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf108 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
text2cypher-demo-16bit - GGUF
| Name | Quant method | Size |
|---|---|---|
| text2cypher-demo-16bit.Q2_K.gguf | Q2_K | 2.96GB |
| text2cypher-demo-16bit.IQ3_XS.gguf | IQ3_XS | 3.28GB |
| text2cypher-demo-16bit.IQ3_S.gguf | IQ3_S | 3.43GB |
| text2cypher-demo-16bit.Q3_K_S.gguf | Q3_K_S | 3.41GB |
| text2cypher-demo-16bit.IQ3_M.gguf | IQ3_M | 3.52GB |
| text2cypher-demo-16bit.Q3_K.gguf | Q3_K | 3.74GB |
| text2cypher-demo-16bit.Q3_K_M.gguf | Q3_K_M | 3.74GB |
| text2cypher-demo-16bit.Q3_K_L.gguf | Q3_K_L | 4.03GB |
| text2cypher-demo-16bit.IQ4_XS.gguf | IQ4_XS | 4.18GB |
| text2cypher-demo-16bit.Q4_0.gguf | Q4_0 | 4.34GB |
| text2cypher-demo-16bit.IQ4_NL.gguf | IQ4_NL | 4.38GB |
| text2cypher-demo-16bit.Q4_K_S.gguf | Q4_K_S | 4.37GB |
| text2cypher-demo-16bit.Q4_K.gguf | Q4_K | 4.58GB |
| text2cypher-demo-16bit.Q4_K_M.gguf | Q4_K_M | 4.58GB |
| text2cypher-demo-16bit.Q4_1.gguf | Q4_1 | 4.78GB |
| text2cypher-demo-16bit.Q5_0.gguf | Q5_0 | 5.21GB |
| text2cypher-demo-16bit.Q5_K_S.gguf | Q5_K_S | 5.21GB |
| text2cypher-demo-16bit.Q5_K.gguf | Q5_K | 5.34GB |
| text2cypher-demo-16bit.Q5_K_M.gguf | Q5_K_M | 5.34GB |
| text2cypher-demo-16bit.Q5_1.gguf | Q5_1 | 5.65GB |
| text2cypher-demo-16bit.Q6_K.gguf | Q6_K | 6.14GB |
| text2cypher-demo-16bit.Q8_0.gguf | Q8_0 | 7.95GB |
language:
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
For more information visit this link
Install dependencies. Check Unsloth documentation for specific installation for other environments.
%%capture
# Installs Unsloth, Xformers (Flash Attention) and all other packages!
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
!pip install --no-deps "xformers<0.0.26" trl peft accelerate bitsandbytes
Then you can load the model and use it as inference
from unsloth.chat_templates import get_chat_template
tokenizer = get_chat_template(
tokenizer,
chat_template = "llama-3",
map_eos_token = True,
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
schema = """Node properties: - **Question** - `favorites`: INTEGER Example: "0" - `answered`: BOOLEAN - `text`: STRING Example: "### This is: Bug ### Specifications OS: Win10" - `link`: STRING Example: "https://stackoverflow.com/questions/62224586/playg" - `createdAt`: DATE_TIME Min: 2020-06-05T16:57:19Z, Max: 2020-06-05T21:49:16Z - `title`: STRING Example: "Playground is not loading with apollo-server-lambd" - `id`: INTEGER Min: 62220505, Max: 62224586 - `upVotes`: INTEGER Example: "0" - `score`: INTEGER Example: "-1" - `downVotes`: INTEGER Example: "1" - **Tag** - `name`: STRING Example: "aws-lambda" - **User** - `image`: STRING Example: "https://lh3.googleusercontent.com/-NcFYSuXU0nk/AAA" - `link`: STRING Example: "https://stackoverflow.com/users/10251021/alexandre" - `id`: INTEGER Min: 751, Max: 13681006 - `reputation`: INTEGER Min: 1, Max: 420137 - `display_name`: STRING Example: "Alexandre Le" Relationship properties: The relationships: (:Question)-[:TAGGED]->(:Tag) (:User)-[:ASKED]->(:Question)"""
question = "Identify the top 5 questions with the most downVotes."
messages = [
{"role": "system", "content": "Given an input question, convert it to a Cypher query. No pre-amble."},
{"role": "user", "content": f"""Based on the Neo4j graph schema below, write a Cypher query that would answer the user's question:
{schema}
Question: {question}
Cypher query:"""}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize = True,
add_generation_prompt = True, # Must add for generation
return_tensors = "pt",
).to("cuda")
outputs = model.generate(input_ids = inputs, max_new_tokens = 128, use_cache = True)
tokenizer.batch_decode(outputs)