Skip to content

GUIBOoO/ankify-local

Repository files navigation

📚 Anki Card Generator with LoRA-Finetuned LLM

Overview

This project aims to fine-tune a Large Language Model (LLM) using LoRA to automatically generate high-quality Anki flashcards from various knowledge sources (Wikipedia or Personal pdfs).

The system supports:

  • Automatic training data generation from PDFs and Wikipedia pages
  • LoRA fine-tuning
  • Flashcard generation from PDFs
  • Flashcard generation from Wikipedia pages

The goal is to produce concise, factual, and pedagogically effective Anki cards suitable for long-term learning.

Models used fro data generation and lora fine-tuning can be ajusted to the user's computing power.

My personal fine-tuned model is available on this link: https://huggingface.co/Guibibo/Mistral-7B-v0.3-FlashCards.


Features

  • LoRA fine-tuning
  • Domain-agnostic flashcard generation
  • PDF parsing and knowledge extraction
  • Wikipedia page ingestion
  • Synthetic training data generation
  • Anki-compatible outputs (APKG)
  • Modular end-to-end pipeline

Usage

Installation

pip install -r environment.yml

Data and cards generation

python3 -m main

JSON datasets combination

python3 -m data.combine_data data/revised/file1.jsonl data/revised/file2.jsonl ...

JSON datasets adaptation of generated data from LLama model to LoRA on a Mistral model

python3 -m data.convert_to_lora.py path/to/file

LoRA fine-tunning

python3 -m LoRA.run_lora

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages